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 <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
c859066ee5
commit
631d350086
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue