1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Memoize info on each request

This commit is contained in:
jc00ke 2012-09-04 09:45:35 -07:00
parent 8ec7e23a74
commit 8bb9b96297

View file

@ -60,12 +60,16 @@ module Sidekiq
end
end
def info
@info ||= Sidekiq.info
end
def processed
Sidekiq.info[:processed]
info[:processed]
end
def failed
Sidekiq.info[:failed]
info[:failed]
end
def zcard(name)
@ -77,7 +81,7 @@ module Sidekiq
end
def backlog
Sidekiq.info[:backlog]
info[:backlog]
end
def retries_with_score(score)