make job queue list in webinterface configurable (#469)

* add an option so you can define the amount of jobs returned in the webinterface jobq

* and now the actually working version
This commit is contained in:
nick n
2018-12-28 17:01:40 +01:00
committed by Oliver Gorwits
parent 08589ebf96
commit 86c38c9466
3 changed files with 5 additions and 3 deletions

View File

@@ -59,8 +59,9 @@ Performs initialisation of the Job Queue backend.
=head2 jq_log() =head2 jq_log()
Returns a list of the most recent 50 jobs in the queue. Jobs are returned as Returns a list of the most recent jobs as defined in C<jobs_qdepth> from the
objects which implement the Netdisco job instance interface (see below). queue. Jobs are returned as objects which implement the Netdisco job instance
interface (see below).
=head2 jq_userlog( $user ) =head2 jq_userlog( $user )

View File

@@ -273,7 +273,7 @@ sub jq_log {
return schema('netdisco')->resultset('Admin')->search({}, { return schema('netdisco')->resultset('Admin')->search({}, {
prefetch => 'target', prefetch => 'target',
order_by => { -desc => [qw/entered device action/] }, order_by => { -desc => [qw/entered device action/] },
rows => 50, rows => (setting('jobs_qdepth') || 50),
})->with_times->hri->all; })->with_times->hri->all;
} }

View File

@@ -324,6 +324,7 @@ workers:
# 50 minutes # 50 minutes
jobs_stale_after: 3000 jobs_stale_after: 3000
jobs_qdepth: 50
dns: dns:
max_outstanding: 50 max_outstanding: 50