From 631d3500867f0cb59c8b9aed7bb4b78f068fc1fd Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 11 Apr 2022 16:10:49 +0100 Subject: [PATCH] Bug 27783: (follow-up) Rename options Why require `job_`.. it's easiery to just use 'queue' and we have 'job' from the context of the script we're calling. This also inproves consistency between the debian commands and the script params. Signed-off-by: Martin Renvoize Signed-off-by: Fridolin Somers --- debian/scripts/koha-worker | 6 +++--- misc/background_jobs_worker.pl | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/debian/scripts/koha-worker b/debian/scripts/koha-worker index faecfa662c..3d3f26257f 100755 --- a/debian/scripts/koha-worker +++ b/debian/scripts/koha-worker @@ -76,7 +76,7 @@ start_worker() log_daemon_msg "Starting Koha worker daemon for $name ($queue)" - if daemon $DAEMONOPTS -- $worker_DAEMON --job-queue ${queue}; then + if daemon $DAEMONOPTS -- $worker_DAEMON --queue ${queue}; then log_end_msg 0 else log_end_msg 1 @@ -107,7 +107,7 @@ stop_worker() log_daemon_msg "Stopping Koha worker daemon for $name ($queue)" - if daemon $DAEMONOPTS --stop -- $worker_DAEMON --job-queue ${queue}; then + if daemon $DAEMONOPTS --stop -- $worker_DAEMON --queue ${queue}; then log_end_msg 0 else log_end_msg 1 @@ -138,7 +138,7 @@ restart_worker() log_daemon_msg "Restarting Koha worker daemon for $name ($queue)" - if daemon $DAEMONOPTS --restart -- $worker_DAEMON --job-queue ${queue}; then + if daemon $DAEMONOPTS --restart -- $worker_DAEMON --queue ${queue}; then log_end_msg 0 else log_end_msg 1 diff --git a/misc/background_jobs_worker.pl b/misc/background_jobs_worker.pl index 5730d7c8ae..0027a820e7 100755 --- a/misc/background_jobs_worker.pl +++ b/misc/background_jobs_worker.pl @@ -21,20 +21,20 @@ background_jobs_worker.pl - Worker script that will process background jobs =head1 SYNOPSIS -./background_jobs_worker.pl [--job-queue QUEUE] +./background_jobs_worker.pl [--queue QUEUE] =head1 DESCRIPTION This script will connect to the Stomp server (RabbitMQ) and subscribe to the queues passed in parameter (or the 'default' queue), or if a Stomp server is not active it will poll the database every 10s for new jobs in the passed queue. -You can specify some queues only (using --job-queue, which is repeatable) if you want to run several workers that will handle their own jobs. +You can specify some queues only (using --queue, which is repeatable) if you want to run several workers that will handle their own jobs. =head1 OPTIONS =over -=item B<--job-queue> +=item B<--queue> Repeatable. Give the job queues this worker will process. @@ -58,7 +58,7 @@ use Koha::BackgroundJobs; my ( $help, @queues ); GetOptions( 'h|help' => \$help, - 'job-queue=s' => \@queues, + 'queue=s' => \@queues, ) || pod2usage(1); pod2usage(0) if $help; -- 2.39.5