Add option to ignore CRON jobs to get-queue
This commit is contained in:
parent
c76c8b2517
commit
727bd2b882
|
@ -1,3 +1,5 @@
|
|||
#! /usr/bin/env bash
|
||||
midclt call core.get_jobs | jq -r '.[] | select( .time_finished == null ) | "\(.id) - \(.arguments[0])"'
|
||||
IGNORE_CRON=${1:-$IGNORE_CRON}
|
||||
CRON_TEST="${IGNORE_CRON:+and (.method != \"cronjob.run\")}"
|
||||
midclt call core.get_jobs | jq -r '.[] | select( (.time_finished == null) '"${CRON_TEST}"' ) | "\(.id) - \(.arguments[0])"'
|
||||
|
||||
|
|
|
@ -6,8 +6,14 @@ USER_HOME=$HOME
|
|||
|
||||
set -e
|
||||
|
||||
count_unfinished_jobs() {
|
||||
midclt call core.get_jobs | jq -r '.[] | select( .time_finished == null )' | wc -l
|
||||
IGNORE_CRON=${1:-${IGNORE_CRON}}
|
||||
|
||||
count_unfinished_jobs() {
|
||||
local TEST_CRON
|
||||
TEST_CRON="${IGNORE_CRON:+" and .method != \"cronjob.run\""}"
|
||||
midclt call core.get_jobs | jq -r '
|
||||
.[] | select( .time_finished == null '"$TEST_CRON"' )
|
||||
' | wc -l
|
||||
}
|
||||
|
||||
wait_for_idle_queue() {
|
||||
|
|
Loading…
Reference in New Issue