class AttentiveSidekiq::RedisBasedHash
Public Class Methods
add(item)
click to toggle source
# File lib/attentive_sidekiq/api.rb, line 16 def add item Sidekiq.redis{ |conn| conn.hset(hash_name, item['jid'], item.to_json) } end
get_job(jid)
click to toggle source
# File lib/attentive_sidekiq/api.rb, line 12 def get_job jid JSON.parse(Sidekiq.redis{|conn| conn.hget(hash_name, jid)}) end
job_ids()
click to toggle source
# File lib/attentive_sidekiq/api.rb, line 8 def job_ids jobs.map{|i| i["jid"]} end
jobs()
click to toggle source
# File lib/attentive_sidekiq/api.rb, line 4 def jobs Sidekiq.redis{|conn| conn.hvals(hash_name)}.map{|i| JSON.parse(i)} end
remove(jid)
click to toggle source
# File lib/attentive_sidekiq/api.rb, line 20 def remove jid Sidekiq.redis{|conn| conn.hdel(hash_name, jid)} end