I am using twitterstream to fetch tweets from twitter and store them to the database. I have been successful in fetching the tweets but not able to run it in the background. Can any one tell me how to do that.
Asked
Active
Viewed 365 times
0
-
possible duplicate of [Ruby on Rails: How to run things in the background?](http://stackoverflow.com/questions/897605/ruby-on-rails-how-to-run-things-in-the-background) – Vivien Barousse Nov 28 '11 at 12:50
-
Are you doing this within a Rails project? twitterstream isn't Rails specific. – muffinista Nov 28 '11 at 14:06
-
@muffinista: Yes.. in a rails project – Pravin Nov 28 '11 at 18:20
2 Answers
0
Such kind of work can be handled in a background worker. Sidekiq is a current and great background worker library, and there's a RailsCast on it.

Thomas Klemm
- 10,678
- 1
- 51
- 54
0
OK, I would look at Custom Daemon with Rails 3 and see if it helps. You have two main options -- load your tweets every couple of minutes via cron, or run a background daemon. The daemon will probably make the most sense.

Community
- 1
- 1

muffinista
- 6,676
- 2
- 30
- 23