summaryrefslogtreecommitdiffstats
path: root/jobqueue.pl
blob: eae05456a1d663dd9ec9633a5c90ef8d027c825d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/perl -w
# -*- Mode: perl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Mozilla Corporation.
# Portions created by the Initial Developer are Copyright (C) 2008
# Mozilla Corporation. All Rights Reserved.
#
# Contributor(s): 
#   Mark Smith <mark@mozilla.com>
#   Max Kanat-Alexander <mkanat@bugzilla.org>

use strict;
use File::Basename;
BEGIN { chdir dirname($0); }

use lib qw(. lib);
use Bugzilla;
use Bugzilla::JobQueue::Runner;

Bugzilla::JobQueue::Runner->new();

=head1 NAME

jobqueue.pl - Runs jobs in the background for Bugzilla.

=head1 SYNOPSIS

 ./jobqueue.pl [OPTION] { start | stop | restart | check | help | version }

   OPTIONS:
   -f        Run in the foreground (don't detach)
   -d        Output a lot of debugging information
   -p file   Specify the file where jobqueue.pl should store its current
             process id. Defaults to F<data/jobqueue.pl.pid>.
   -n name   What should this process call itself in the system log?
             Defaults to the full path you used to invoke the script.

   COMMANDS:
   start     Starts a new jobqueue daemon if there isn't one running already
   stop      Stops a running jobqueue daemon
   restart   Stops a running jobqueue if one is running, and then
             starts a new one.
   check     Report the current status of the daemon.
   help      Display this usage info
   version   Display the version of jobqueue.pl

=head1 DESCRIPTION

See L<Bugzilla::JobQueue> and L<Bugzilla::JobQueue::Runner>.