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

(-)a/misc/background_jobs_worker.pl (-2 / +6 lines)
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
}
(-)a/xt/memory_check.t (-2 / +5 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use Test::More tests => 1;
19
use Test::More tests => 2;
20
use FindBin;
20
21
21
my $pid = qx[ps ax | grep 'background_jobs_worker.pl --queue default' | grep -v grep | tail -n1 | awk '{print \$1}'];
22
my $pid = qx[ps ax | grep 'background_jobs_worker.pl --queue default' | grep -v grep | tail -n1 | awk '{print \$1}'];
22
23
Lines 34-36 SKIP: { Link Here
34
        pass("background_jobs_worker.pl is consuming $memory_usage in memory");
35
        pass("background_jobs_worker.pl is consuming $memory_usage in memory");
35
    }
36
    }
36
}
37
}
37
- 
38
39
my $output = qx{$FindBin::Bin/../misc/background_jobs_worker.pl -m | grep 'Koha/Plugins.pm'};
40
is( $output, q{}, "Koha::Plugins not loaded by background_jobs_worker.pl" );

Return to bug 32561