diff --git a/lib/App/Netdisco/JobQueue.pm b/lib/App/Netdisco/JobQueue.pm index 733cf4bb..7e5448bd 100644 --- a/lib/App/Netdisco/JobQueue.pm +++ b/lib/App/Netdisco/JobQueue.pm @@ -59,8 +59,9 @@ Performs initialisation of the Job Queue backend. =head2 jq_log() -Returns a list of the most recent 50 jobs in the queue. Jobs are returned as -objects which implement the Netdisco job instance interface (see below). +Returns a list of the most recent jobs as defined in C from the +queue. Jobs are returned as objects which implement the Netdisco job instance +interface (see below). =head2 jq_userlog( $user ) diff --git a/lib/App/Netdisco/JobQueue/PostgreSQL.pm b/lib/App/Netdisco/JobQueue/PostgreSQL.pm index a16913f0..7cd3c9ff 100644 --- a/lib/App/Netdisco/JobQueue/PostgreSQL.pm +++ b/lib/App/Netdisco/JobQueue/PostgreSQL.pm @@ -273,7 +273,7 @@ sub jq_log { return schema('netdisco')->resultset('Admin')->search({}, { prefetch => 'target', order_by => { -desc => [qw/entered device action/] }, - rows => 50, + rows => (setting('jobs_qdepth') || 50), })->with_times->hri->all; } diff --git a/share/config.yml b/share/config.yml index 7bff71ec..c5d77fa9 100644 --- a/share/config.yml +++ b/share/config.yml @@ -324,6 +324,7 @@ workers: # 50 minutes jobs_stale_after: 3000 +jobs_qdepth: 50 dns: max_outstanding: 50