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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
6a83a1dd
Commit
6a83a1dd
authored
Apr 11, 2012
by
Gervase Markham
Committed by
Gervase Markham
Apr 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 706412 - make JobQueue.pm support insertion of Job objects, and also enable…
Bug 706412 - make JobQueue.pm support insertion of Job objects, and also enable prioritization. r,a=LpSolit.
parent
b4fee2c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
JobQueue.pm
Bugzilla/JobQueue.pm
+13
-5
No files found.
Bugzilla/JobQueue.pm
View file @
6a83a1dd
...
@@ -53,6 +53,7 @@ sub new {
...
@@ -53,6 +53,7 @@ sub new {
prefix
=>
'ts_'
,
prefix
=>
'ts_'
,
}],
}],
driver_cache_expiration
=>
DRIVER_CACHE_TIME
,
driver_cache_expiration
=>
DRIVER_CACHE_TIME
,
prioritize
=>
1
,
);
);
return
$self
;
return
$self
;
...
@@ -70,12 +71,19 @@ sub insert {
...
@@ -70,12 +71,19 @@ sub insert {
my
$self
=
shift
;
my
$self
=
shift
;
my
$job
=
shift
;
my
$job
=
shift
;
my
$mapped_job
=
Bugzilla::
JobQueue
->
job_map
()
->
{
$job
};
if
(
!
ref
(
$job
))
{
ThrowCodeError
(
'jobqueue_no_job_mapping'
,
{
job
=>
$job
})
my
$mapped_job
=
Bugzilla::
JobQueue
->
job_map
()
->
{
$job
};
if
!
$mapped_job
;
ThrowCodeError
(
'jobqueue_no_job_mapping'
,
{
job
=>
$job
})
unshift
(
@_
,
$mapped_job
)
;
if
!
$mapped_job
;
my
$retval
=
$self
->
SUPER::
insert
(
@_
);
$job
=
new
TheSchwartz::
Job
(
funcname
=>
$mapped_job
,
arg
=>
$_
[
0
],
priority
=>
$_
[
1
]
||
5
);
}
my
$retval
=
$self
->
SUPER::
insert
(
$job
);
# XXX Need to get an error message here if insert fails, but
# XXX Need to get an error message here if insert fails, but
# I don't see any way to do that in TheSchwartz.
# I don't see any way to do that in TheSchwartz.
ThrowCodeError
(
'jobqueue_insert_failed'
,
{
job
=>
$job
,
errmsg
=>
$@
})
ThrowCodeError
(
'jobqueue_insert_failed'
,
{
job
=>
$job
,
errmsg
=>
$@
})
...
...
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