Browse files

Better tweet parsing

  • Loading branch information...
1 parent b6eca1c commit f16fa0060a510516567e563c40c47ee26b2d49aa @suttree committed Apr 7, 2012
Showing with 9 additions and 4 deletions.
  1. +9 −4 lib/tasks/scheduler.rake
View
13 lib/tasks/scheduler.rake
@@ -10,10 +10,15 @@ task :cron => :environment do
setup_twitter_for(user)
- tweets = if user.last_tweet_id
- Twitter.home_timeline(:count => 100, :since => user.last_tweet_id, :include_rts => 0)
- else
- Twitter.home_timeline(:include_rts => 0)
+ begin
+ tweets = if user.last_tweet_id
+ Twitter.home_timeline(:count => 100, :since => user.last_tweet_id, :include_rts => 0)
+ else
+ Twitter.home_timeline(:include_rts => 0)
+ end
+ rescue
+ puts "Failed to process tweets for #{user.login}"
+ next
end
next if tweets.nil?

0 comments on commit f16fa00

Please sign in to comment.