Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
2a5c9e0c
Commit
2a5c9e0c
authored
Jan 27, 2011
by
Gervase Markham
Committed by
Gervase Markham
Jan 27, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow jobqueue.pl to run once and then exit. r=mkanat.
https://bugzilla.mozilla.org/show_bug.cgi?id=621256
parent
73cdd3ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
Runner.pm
Bugzilla/JobQueue/Runner.pm
+19
-1
jobqueue.pl
jobqueue.pl
+2
-0
No files found.
Bugzilla/JobQueue/Runner.pm
View file @
2a5c9e0c
...
...
@@ -196,16 +196,34 @@ sub gd_setup_signals {
$SIG
{
TERM
}
=
sub
{
$self
->
gd_quit_event
();
}
}
sub
gd_other_cmd
{
my
(
$self
)
=
shift
;
if
(
$ARGV
[
0
]
eq
"once"
)
{
$self
->
_do_work
(
"work_once"
);
exit
(
0
);
}
$self
->
SUPER::
gd_other_cmd
();
}
sub
gd_run
{
my
$self
=
shift
;
$self
->
_do_work
(
"work"
);
}
sub
_do_work
{
my
(
$self
,
$fn
)
=
@_
;
my
$jq
=
Bugzilla
->
job_queue
();
$jq
->
set_verbose
(
$self
->
{
debug
});
foreach
my
$module
(
values
%
{
Bugzilla::
JobQueue
->
job_map
()
})
{
eval
"use $module"
;
$jq
->
can_do
(
$module
);
}
$jq
->
work
;
$jq
->
$fn
;
}
1
;
...
...
jobqueue.pl
View file @
2a5c9e0c
...
...
@@ -52,6 +52,8 @@ jobqueue.pl - Runs jobs in the background for Bugzilla.
stop
Stops
a
running
jobqueue
daemon
restart
Stops
a
running
jobqueue
if
one
is
running
,
and
then
starts
a
new
one
.
once
Checks
the
job
queue
once
,
executes
the
first
item
found
(
if
any
)
and
then
exits
check
Report
the
current
status
of
the
daemon
.
install
On
some
*
nix
systems
,
this
automatically
installs
and
configures
jobqueue
.
pl
as
a
system
service
so
that
it
will
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment