mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Merge pull request #1081 from feedbin/workers_size
User workers_size instead of workers.size for better performance.
This commit is contained in:
commit
093ca901ee
3 changed files with 3 additions and 3 deletions
|
@ -46,7 +46,7 @@ module Sidekiq
|
||||||
end
|
end
|
||||||
|
|
||||||
def workers_size
|
def workers_size
|
||||||
Sidekiq.redis do |conn|
|
@workers_size ||= Sidekiq.redis do |conn|
|
||||||
conn.scard('workers')
|
conn.scard('workers')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,7 +6,7 @@ ul.unstyled.summary.row
|
||||||
span.count #{number_with_delimiter(stats.failed)}
|
span.count #{number_with_delimiter(stats.failed)}
|
||||||
span.desc = t('Failed')
|
span.desc = t('Failed')
|
||||||
li.busy.span2
|
li.busy.span2
|
||||||
span.count #{number_with_delimiter(workers.size)}
|
span.count #{number_with_delimiter(workers_size)}
|
||||||
span.desc = t('Busy')
|
span.desc = t('Busy')
|
||||||
li.scheduled.span2
|
li.scheduled.span2
|
||||||
span.count #{number_with_delimiter(stats.scheduled_size)}
|
span.count #{number_with_delimiter(stats.scheduled_size)}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
h3 = t('Workers')
|
h3 = t('Workers')
|
||||||
|
|
||||||
== slim :_workers
|
== slim :_workers
|
||||||
- if workers.size > 0
|
- if workers_size > 0
|
||||||
.row
|
.row
|
||||||
.span2.pull-right
|
.span2.pull-right
|
||||||
form action="#{root_path}reset" method="post"
|
form action="#{root_path}reset" method="post"
|
||||||
|
|
Loading…
Reference in a new issue