Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio_mebibou
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
Alexandra Rogova
jio_mebibou
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
Show 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,12 +40,14 @@ function enableJobQueue(jio, shared, options) {
...
@@ -40,12 +40,14 @@ function enableJobQueue(jio, shared, options) {
);
);
shared
.
on
(
'
job
'
,
function
(
param
)
{
shared
.
on
(
'
job
'
,
function
(
param
)
{
if
(
indexOf
(
param
.
state
,
[
'
fail
'
,
'
done
'
])
===
-
1
)
{
if
(
!
param
.
stored
)
{
if
(
!
param
.
stored
)
{
shared
.
job_queue
.
load
();
shared
.
job_queue
.
load
();
shared
.
job_queue
.
post
(
param
);
shared
.
job_queue
.
post
(
param
);
shared
.
job_queue
.
save
();
shared
.
job_queue
.
save
();
param
.
stored
=
true
;
param
.
stored
=
true
;
}
}
}
});
});
[
'
jobRun
'
,
'
jobStop
'
].
forEach
(
function
(
event
)
{
[
'
jobRun
'
,
'
jobStop
'
].
forEach
(
function
(
event
)
{
...
...
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