shengwu / SportsTweet

Visualizin' tweets
1 stars 2 forks source link

Create background process to store tweets (and delete old ones) #7

Closed shengwu closed 11 years ago

shengwu commented 11 years ago

This series of three tutorials (127, 128, 129) might help: http://railscasts.com/episodes/127-rake-in-background and http://railscasts.com/episodes/366-sidekiq

This process needs to receive tweets from the Streaming API (however we decide to filter them in #3), store them in the database, and remove old ones so we don't have an unmanageable number of tweets. This can be time-based (using Tweet.created_at) or we can have a set number of tweets in the database (maybe 10000) where for each new tweet received we delete the oldest.

richchang0 commented 11 years ago

seems like this is more of what we are looking for

http://railscasts.com/episodes/164-cron-in-ruby

richchang0 commented 11 years ago

closed in 7b63f22