Lines 21-27
background_jobs_worker.pl - Worker script that will process background jobs
Link Here
|
21 |
|
21 |
|
22 |
=head1 SYNOPSIS |
22 |
=head1 SYNOPSIS |
23 |
|
23 |
|
24 |
./background_jobs_worker.pl [--queue QUEUE] |
24 |
./background_jobs_worker.pl [--queue QUEUE] [-m] |
25 |
|
25 |
|
26 |
=head1 DESCRIPTION |
26 |
=head1 DESCRIPTION |
27 |
|
27 |
|
Lines 30-35
or if a Stomp server is not active it will poll the database every 10s for new j
Link Here
|
30 |
|
30 |
|
31 |
You can specify some queues only (using --queue, which is repeatable) if you want to run several workers that will handle their own jobs. |
31 |
You can specify some queues only (using --queue, which is repeatable) if you want to run several workers that will handle their own jobs. |
32 |
|
32 |
|
|
|
33 |
-m or --modules will cause the script to print the included Perl modules and exit. |
33 |
=head1 OPTIONS |
34 |
=head1 OPTIONS |
34 |
|
35 |
|
35 |
=over |
36 |
=over |
Lines 55-68
use Getopt::Long;
Link Here
|
55 |
|
56 |
|
56 |
use Koha::BackgroundJobs; |
57 |
use Koha::BackgroundJobs; |
57 |
|
58 |
|
58 |
my ( $help, @queues ); |
59 |
my ( $help, @queues, $modules ); |
59 |
GetOptions( |
60 |
GetOptions( |
60 |
'h|help' => \$help, |
61 |
'h|help' => \$help, |
61 |
'queue=s' => \@queues, |
62 |
'queue=s' => \@queues, |
|
|
63 |
'm|modules' => \$modules, |
62 |
) || pod2usage(1); |
64 |
) || pod2usage(1); |
63 |
|
65 |
|
64 |
pod2usage(0) if $help; |
66 |
pod2usage(0) if $help; |
65 |
|
67 |
|
|
|
68 |
if ($modules) { print join "\n", %INC; print "\n"; exit 0; } |
69 |
|
66 |
unless (@queues) { |
70 |
unless (@queues) { |
67 |
push @queues, 'default'; |
71 |
push @queues, 'default'; |
68 |
} |
72 |
} |