-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b940a91
commit 33a0218
Showing
3 changed files
with
14 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
web: bundle exec rails server thin -p $PORT | ||
web: bundle exec rails server thin -p $PORT | ||
worker: bundle exec rake refresh_tweets_worker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,13 @@ | ||
desc "Refresh the app with friends from twitter" | ||
task :refresh_tweets => :environment do | ||
RUBYFRIENDS_APP.refresh_tweets | ||
end | ||
end | ||
|
||
desc "Refresh tweets every minute" | ||
task :refresh_tweets_worker => :environment do | ||
loop do | ||
RUBYFRIENDS_APP.refresh_tweets | ||
puts "Sleeping for 60 seconds..." | ||
sleep 60 | ||
end | ||
end |