From 5444e38257197a7ae50d24d1cdd8b25c3210acbd Mon Sep 17 00:00:00 2001 From: rhenium Date: Sun, 18 May 2014 07:40:57 +0900 Subject: collector: update tweets/users only if cache missed --- lib/collector/event_queue.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3