Module: Tekeya::Feed::Activity::Resque::ClassMethods
- Defined in:
- lib/tekeya/feed/activity/resque.rb
Instance Method Summary collapse
-
#write_to_feed(feed_key, score, activity_key) ⇒ Object
Writes the activity reference to the feed with the supplied key.
Instance Method Details
#write_to_feed(feed_key, score, activity_key) ⇒ Object
Writes the activity reference to the feed with the supplied key
17 18 19 20 21 22 23 |
# File 'lib/tekeya/feed/activity/resque.rb', line 17 def write_to_feed(feed_key, score, activity_key) # add the activity to the owner's profile feed ::Tekeya.redis.zadd(feed_key, score, activity_key) # increment the activity counter to keep track of its presence in feeds activity_counter_key = "#{activity_key}:counter" ::Tekeya.redis.incr(activity_counter_key) end |