#142: separate users tasks and tasks of mass builds
This commit is contained in:
parent
b5a039f1c9
commit
40449c81ef
|
@ -1,13 +1,42 @@
|
|||
- queues ||= [:rpm, :publish]
|
||||
.bordered.nopadding
|
||||
%h3.medium= t('layout.build_lists.build_server_status.header')
|
||||
- queues.each do |queue|
|
||||
|
||||
- if queues.include? :rpm
|
||||
.table
|
||||
.lefter= t("layout.build_lists.build_server_status.rpm_workers")
|
||||
.both
|
||||
.table
|
||||
.lefter= t("layout.build_lists.build_server_status.count")
|
||||
.righter= @build_server_status[:rpm][:count]
|
||||
.both
|
||||
.table
|
||||
.lefter= t("layout.build_lists.build_server_status.tasks")
|
||||
.both
|
||||
.table
|
||||
.lefter= t("layout.build_lists.build_server_status.user_tasks")
|
||||
.righter= @build_server_status[:rpm][:default_tasks]
|
||||
.both
|
||||
.table
|
||||
.lefter= t("layout.build_lists.build_server_status.mass_build_tasks")
|
||||
.righter= @build_server_status[:rpm][:low_tasks]
|
||||
.both
|
||||
%br
|
||||
|
||||
- (queues - [:rpm]).each do |queue|
|
||||
.table
|
||||
.lefter= t("layout.build_lists.build_server_status.#{queue}_workers")
|
||||
.both
|
||||
- [:count, :tasks, :build_tasks].each do |metric|
|
||||
.table
|
||||
.lefter= t("layout.build_lists.build_server_status.#{metric}")
|
||||
.righter= @build_server_status[queue][metric]
|
||||
- if metric == :tasks
|
||||
- count = @build_server_status[queue][:default_tasks] + @build_server_status[queue][:low_tasks]
|
||||
- else
|
||||
- count = @build_server_status[queue][metric]
|
||||
.righter= count
|
||||
.both
|
||||
%br
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -101,6 +101,8 @@ en:
|
|||
header: Build server status
|
||||
count: '- count'
|
||||
tasks: '- tasks in queue'
|
||||
user_tasks: "-- user's"
|
||||
mass_build_tasks: "-- mass build's"
|
||||
build_tasks: '- tasks in execution'
|
||||
rpm_workers: Workers for building
|
||||
iso_workers: Workers for building
|
||||
|
|
|
@ -100,6 +100,8 @@ ru:
|
|||
header: Статус сборочного сервера
|
||||
count: '- число'
|
||||
tasks: '- заданий в очереди'
|
||||
user_tasks: '-- пользовательских'
|
||||
mass_build_tasks: '-- массовой сборки'
|
||||
build_tasks: '- заданий выполняется'
|
||||
rpm_workers: Воркеров для сборки
|
||||
iso_workers: Воркеров для сборки
|
||||
|
|
|
@ -28,10 +28,12 @@ module AbfWorker
|
|||
|
||||
def status_of_worker(workers, worker)
|
||||
redis, key = Resque.redis, "queue:#{worker}_worker"
|
||||
default_tasks, tasks = redis.llen("#{key}_default"), redis.llen(key)
|
||||
{
|
||||
:count => workers.count,
|
||||
:build_tasks => workers.select{ |w| w.working? }.count,
|
||||
:tasks => (redis.llen("#{key}_default") + redis.llen(key))
|
||||
:count => workers.count,
|
||||
:build_tasks => workers.select{ |w| w.working? }.count,
|
||||
:default_tasks => redis.llen("#{key}_default"),
|
||||
:low_tasks => redis.llen(key)
|
||||
}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue