diff options
author | rhenium <rhenium@rhe.jp> | 2014-06-05 06:51:56 +0900 |
---|---|---|
committer | rhenium <rhenium@rhe.jp> | 2014-06-05 06:51:56 +0900 |
commit | 4dae72b60ef7cc65b0c5ed66a47630134f4fa696 (patch) | |
tree | 56785050d5272324ed725ef6f4b52de2cdcb315b /lib | |
parent | cacb927220c3a33d3e10963d7cb6eaabbd5ff6fa (diff) | |
download | aclog-4dae72b60ef7cc65b0c5ed66a47630134f4fa696.tar.gz |
collector: don't defer notification
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 e3e17c7..02dba68 100644 --- a/lib/collector/event_queue.rb +++ b/lib/collector/event_queue.rb @@ -27,6 +27,12 @@ module Collector Tweet.destroy_bulk_from_json(queue_delete) Retweet.delete_bulk_from_json(queue_delete) end + + queue_favorite.each do |event| + Notification.try_notify_favorites(id: event[:target_object][:id], + user_id: event[:target_object][:user][:id], + favorites_count: event[:target_object][:favorite_count]) + end end def push_user(user) @@ -43,12 +49,6 @@ module Collector push_tweet(event[:target_object]) push_user(event[:source]) @queue_favorite << event - - EM.defer do - Notification.try_notify_favorites(id: event[:target_object][:id], - user_id: event[:target_object][:user][:id], - favorites_count: event[:target_object][:favorite_count]) - end end end |