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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def info
|
||||||
|
@info ||= Sidekiq.info
|
||||||
|
end
|
||||||
|
|
||||||
def processed
|
def processed
|
||||||
Sidekiq.info[:processed]
|
info[:processed]
|
||||||
end
|
end
|
||||||
|
|
||||||
def failed
|
def failed
|
||||||
Sidekiq.info[:failed]
|
info[:failed]
|
||||||
end
|
end
|
||||||
|
|
||||||
def zcard(name)
|
def zcard(name)
|
||||||
|
@ -77,7 +81,7 @@ module Sidekiq
|
||||||
end
|
end
|
||||||
|
|
||||||
def backlog
|
def backlog
|
||||||
Sidekiq.info[:backlog]
|
info[:backlog]
|
||||||
end
|
end
|
||||||
|
|
||||||
def retries_with_score(score)
|
def retries_with_score(score)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue