Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
jio
Commits
a4bba05b
Commit
a4bba05b
authored
Aug 26, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
job queue is not well cleaned -> fixed
parent
d0802be2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
src/jio/features/jobChecker.js
src/jio/features/jobChecker.js
+4
-3
src/jio/features/jobQueue.js
src/jio/features/jobQueue.js
+8
-6
No files found.
src/jio/features/jobChecker.js
View file @
a4bba05b
/*jslint indent: 2, maxlen: 80, sloppy: true, nomen: true, unparam: true */
/*jslint indent: 2, maxlen: 80, sloppy: true, nomen: true, unparam: true */
/*global arrayInsert, indexOf, deepClone, defaults */
/*global arrayInsert, indexOf, deepClone, defaults
, IODeferred
*/
// creates
// creates
// - some defaults job rule actions
// - some defaults job rule actions
...
@@ -44,8 +44,9 @@ function enableJobChecker(jio, shared, options) {
...
@@ -44,8 +44,9 @@ function enableJobChecker(jio, shared, options) {
new_job
.
modified
=
new
Date
();
new_job
.
modified
=
new
Date
();
},
},
deny
:
function
(
original_job
,
new_job
)
{
deny
:
function
(
original_job
,
new_job
)
{
new_job
.
state
=
'
running
'
;
new_job
.
state
=
'
fail
'
;
new_job
.
command
.
reject
(
new_job
.
modified
=
new
Date
();
IODeferred
.
createFromParam
(
new_job
).
reject
(
'
precondition_failed
'
,
'
precondition_failed
'
,
'
command denied
'
,
'
command denied
'
,
'
Command rejected by the job checker.
'
'
Command rejected by the job checker.
'
...
...
src/jio/features/jobQueue.js
View file @
a4bba05b
/*jslint indent: 2, maxlen: 80, sloppy: true, nomen: true, unparam: true */
/*jslint indent: 2, maxlen: 80, sloppy: true, nomen: true, unparam: true */
/*global arrayExtend, localStorage, Workspace, uniqueJSONStringify, JobQueue,
/*global arrayExtend, localStorage, Workspace, uniqueJSONStringify, JobQueue,
constants */
constants
, indexOf
*/
function
enableJobQueue
(
jio
,
shared
,
options
)
{
function
enableJobQueue
(
jio
,
shared
,
options
)
{
...
@@ -40,11 +40,13 @@ function enableJobQueue(jio, shared, options) {
...
@@ -40,11 +40,13 @@ function enableJobQueue(jio, shared, options) {
);
);
shared
.
on
(
'
job
'
,
function
(
param
)
{
shared
.
on
(
'
job
'
,
function
(
param
)
{
if
(
!
param
.
stored
)
{
if
(
indexOf
(
param
.
state
,
[
'
fail
'
,
'
done
'
])
===
-
1
)
{
shared
.
job_queue
.
load
();
if
(
!
param
.
stored
)
{
shared
.
job_queue
.
post
(
param
);
shared
.
job_queue
.
load
();
shared
.
job_queue
.
save
();
shared
.
job_queue
.
post
(
param
);
param
.
stored
=
true
;
shared
.
job_queue
.
save
();
param
.
stored
=
true
;
}
}
}
});
});
...
...
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