lib/tekeya/feed/activity/resque/untrack_feed.rb in tekeya-0.0.7 vs lib/tekeya/feed/activity/resque/untrack_feed.rb in tekeya-0.0.9
- old
+ new
@@ -10,9 +10,10 @@
# @private
def self.perform(untracked_feed_key, untracker_feed_key)
# get the keys to the activities so we can decrement the counters later
activity_keys = ::Tekeya.redis.zrange(untracked_feed_key, 0, -1)
+ return if activity_keys.empty?
::Tekeya.redis.multi do
# delete the latest activities of the untracked entity from the tracker feed
::Tekeya.redis.zrem(untracker_feed_key, activity_keys)
\ No newline at end of file