RSS

(root)/bugzilla/trunk : /jobqueue.pl (revision 8182)

To get this branch, use:
bzr branch /bugzilla/trunk
Line Revision Contents
1 6365
#!/usr/bin/perl -w
2 8075
# This Source Code Form is subject to the terms of the Mozilla Public
3
# License, v. 2.0. If a copy of the MPL was not distributed with this
4
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
5
#
6
# This Source Code Form is "Incompatible With Secondary Licenses", as
7
# defined by the Mozilla Public License, v. 2.0.
8 6365
9
use strict;
10
use File::Basename;
11
BEGIN { chdir dirname($0); }
12
13
use lib qw(. lib);
14
use Bugzilla;
15
use Bugzilla::JobQueue::Runner;
16
17
Bugzilla::JobQueue::Runner->new();
18
19
=head1 NAME
20
21
jobqueue.pl - Runs jobs in the background for Bugzilla.
22
23
=head1 SYNOPSIS
24
25 6722
 ./jobqueue.pl [OPTIONS] COMMAND
26 6365
27 6702
   OPTIONS:
28 6365
   -f        Run in the foreground (don't detach)
29
   -d        Output a lot of debugging information
30 6702
   -p file   Specify the file where jobqueue.pl should store its current
31
             process id. Defaults to F<data/jobqueue.pl.pid>.
32
   -n name   What should this process call itself in the system log?
33
             Defaults to the full path you used to invoke the script.
34
35
   COMMANDS:
36 6365
   start     Starts a new jobqueue daemon if there isn't one running already
37 6366
   stop      Stops a running jobqueue daemon
38 6365
   restart   Stops a running jobqueue if one is running, and then
39
             starts a new one.
40 7683
   once      Checks the job queue once, executes the first item found (if
41
             any) and then exits
42 6365
   check     Report the current status of the daemon.
43 6722
   install   On some *nix systems, this automatically installs and
44
             configures jobqueue.pl as a system service so that it will
45
             start every time the machine boots.
46
   uninstall Removes the system service for jobqueue.pl.
47 6366
   help      Display this usage info
48 6365
   version   Display the version of jobqueue.pl
49
50
=head1 DESCRIPTION
51
52
See L<Bugzilla::JobQueue> and L<Bugzilla::JobQueue::Runner>.
53 6722
54
=head1 Running jobqueue.pl as a System Service
55
56
For systems that use Upstart or SysV Init, there is a SysV/Upstart init
57
script included with Bugzilla for jobqueue.pl: F<contrib/bugzilla-queue>.
58
It should work out-of-the-box on RHEL, Fedora, CentOS etc.
59
60
You can install it by doing C<./jobqueue.pl install> as root, after
61
already having run L<checksetup> at least once to completion
62
on this Bugzilla installation.
63
64
If you are using a system that isn't RHEL, Fedora, CentOS, etc., then you
65
may have to modify F<contrib/bugzilla-queue> and install it yourself
66
manually in order to get C<jobqueue.pl> running as a system service.

Loggerhead 1.18.1 is a web-based interface for Bazaar branches