diff options
author | rhenium <rhenium@rhe.jp> | 2014-05-18 07:40:57 +0900 |
---|---|---|
committer | rhenium <rhenium@rhe.jp> | 2014-05-18 07:40:57 +0900 |
commit | 5444e38257197a7ae50d24d1cdd8b25c3210acbd (patch) | |
tree | 18e0252995a6a4652b53fe7f98205c183e2355d1 /lib | |
parent | 45b246e823f169438ff7fe16f251a527f2bc7b3a (diff) | |
download | aclog-5444e38257197a7ae50d24d1cdd8b25c3210acbd.tar.gz |
collector: update tweets/users only if cache missed
Diffstat (limited to 'lib')
-rw-r--r-- | lib/collector/event_queue.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/collector/event_queue.rb b/lib/collector/event_queue.rb index c7ca517..f04a0c7 100644 --- a/lib/collector/event_queue.rb +++ b/lib/collector/event_queue.rb @@ -44,25 +44,25 @@ module Collector end def push_favorite(event) - push_tweet(event[:target_object]) - push_user(event[:source]) caching(:favorite, "#{event[:created_at]}-#{event[:source][:id]}-#{event[:target_object][:id]}") do + push_tweet(event[:target_object]) + push_user(event[:source]) @queue_favorite << event end end def push_retweet(status) - push_user(status[:user]) - push_tweet(status[:retweeted_status]) caching(:retweet, status[:id]) do + push_user(status[:user]) + push_tweet(status[:retweeted_status]) @queue_retweet << status end end def push_unfavorite(event) - push_tweet(event[:target_object]) - push_user(event[:source]) caching(:unfavorite, "#{event[:created_at]}-#{event[:source][:id]}-#{event[:target_object][:id]}") do + push_tweet(event[:target_object]) + push_user(event[:source]) @queue_unfavorite << event end end |