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:
parent
8ec7e23a74
commit
8bb9b96297
1 changed files with 7 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue