View | Details | Raw Unified | Return to bug 27783
Collapse All | Expand All

(-)a/debian/scripts/koha-worker (-3 / +3 lines)
Lines 76-82 start_worker() Link Here
76
76
77
        log_daemon_msg "Starting Koha worker daemon for $name ($queue)"
77
        log_daemon_msg "Starting Koha worker daemon for $name ($queue)"
78
78
79
        if daemon $DAEMONOPTS -- $worker_DAEMON --job-queue ${queue}; then
79
        if daemon $DAEMONOPTS -- $worker_DAEMON --queue ${queue}; then
80
            log_end_msg 0
80
            log_end_msg 0
81
        else
81
        else
82
            log_end_msg 1
82
            log_end_msg 1
Lines 107-113 stop_worker() Link Here
107
107
108
        log_daemon_msg "Stopping Koha worker daemon for $name ($queue)"
108
        log_daemon_msg "Stopping Koha worker daemon for $name ($queue)"
109
109
110
        if daemon $DAEMONOPTS --stop -- $worker_DAEMON --job-queue ${queue}; then
110
        if daemon $DAEMONOPTS --stop -- $worker_DAEMON --queue ${queue}; then
111
            log_end_msg 0
111
            log_end_msg 0
112
        else
112
        else
113
            log_end_msg 1
113
            log_end_msg 1
Lines 138-144 restart_worker() Link Here
138
138
139
        log_daemon_msg "Restarting Koha worker daemon for $name ($queue)"
139
        log_daemon_msg "Restarting Koha worker daemon for $name ($queue)"
140
140
141
        if daemon $DAEMONOPTS --restart -- $worker_DAEMON --job-queue ${queue}; then
141
        if daemon $DAEMONOPTS --restart -- $worker_DAEMON --queue ${queue}; then
142
            log_end_msg 0
142
            log_end_msg 0
143
        else
143
        else
144
            log_end_msg 1
144
            log_end_msg 1
(-)a/misc/background_jobs_worker.pl (-5 / +4 lines)
Lines 21-40 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 [--job-queue QUEUE]
24
./background_jobs_worker.pl [--queue QUEUE]
25
25
26
=head1 DESCRIPTION
26
=head1 DESCRIPTION
27
27
28
This script will connect to the Stomp server (RabbitMQ) and subscribe to the queues passed in parameter (or the 'default' queue),
28
This script will connect to the Stomp server (RabbitMQ) and subscribe to the queues passed in parameter (or the 'default' queue),
29
or if a Stomp server is not active it will poll the database every 10s for new jobs in the passed queue.
29
or if a Stomp server is not active it will poll the database every 10s for new jobs in the passed queue.
30
30
31
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.
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
=head1 OPTIONS
33
=head1 OPTIONS
34
34
35
=over
35
=over
36
36
37
=item B<--job-queue>
37
=item B<--queue>
38
38
39
Repeatable. Give the job queues this worker will process.
39
Repeatable. Give the job queues this worker will process.
40
40
Lines 58-64 use Koha::BackgroundJobs; Link Here
58
my ( $help, @queues );
58
my ( $help, @queues );
59
GetOptions(
59
GetOptions(
60
    'h|help' => \$help,
60
    'h|help' => \$help,
61
    'job-queue=s' => \@queues,
61
    'queue=s' => \@queues,
62
) || pod2usage(1);
62
) || pod2usage(1);
63
63
64
pod2usage(0) if $help;
64
pod2usage(0) if $help;
65
- 

Return to bug 27783