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
Ivan Tyagov
jio
Commits
d7746222
Commit
d7746222
authored
Oct 11, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
One job rule condition added + 2 default job rules modified
parent
d4b86325
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
src/jio/core/globals.js
src/jio/core/globals.js
+19
-1
src/jio/features/jobChecker.js
src/jio/features/jobChecker.js
+2
-0
No files found.
src/jio/core/globals.js
View file @
d7746222
...
@@ -421,6 +421,23 @@ defaults.job_rule_conditions = {};
...
@@ -421,6 +421,23 @@ defaults.job_rule_conditions = {};
return
a
.
kwargs
.
_id
===
b
.
kwargs
.
_id
;
return
a
.
kwargs
.
_id
===
b
.
kwargs
.
_id
;
}
}
/**
* Test if the jobs have a document id.
*
* @param {Object} a The first job to test
* @param {Object} b The second job to test
* @return {Boolean} True if ids exist, else false
*/
function
haveDocumentIds
(
a
,
b
)
{
if
(
typeof
a
.
kwargs
.
_id
!==
"
string
"
||
a
.
kwargs
.
_id
===
""
)
{
return
false
;
}
if
(
typeof
b
.
kwargs
.
_id
!==
"
string
"
||
b
.
kwargs
.
_id
===
""
)
{
return
false
;
}
return
true
;
}
/**
/**
* Compare two jobs and test if their kwargs are equal
* Compare two jobs and test if their kwargs are equal
*
*
...
@@ -452,7 +469,8 @@ defaults.job_rule_conditions = {};
...
@@ -452,7 +469,8 @@ defaults.job_rule_conditions = {};
"
sameMethod
"
:
sameMethod
,
"
sameMethod
"
:
sameMethod
,
"
sameDocumentId
"
:
sameDocumentId
,
"
sameDocumentId
"
:
sameDocumentId
,
"
sameParameters
"
:
sameParameters
,
"
sameParameters
"
:
sameParameters
,
"
sameOptions
"
:
sameOptions
"
sameOptions
"
:
sameOptions
,
"
haveDocumentIds
"
:
haveDocumentIds
};
};
}());
}());
src/jio/features/jobChecker.js
View file @
d7746222
...
@@ -210,6 +210,7 @@ function enableJobChecker(jio, shared, options) {
...
@@ -210,6 +210,7 @@ function enableJobChecker(jio, shared, options) {
"
sameStorageDescription
"
,
"
sameStorageDescription
"
,
"
areWriters
"
,
"
areWriters
"
,
"
sameMethod
"
,
"
sameMethod
"
,
"
haveDocumentIds
"
,
"
sameParameters
"
"
sameParameters
"
],
],
"
action
"
:
"
update
"
"
action
"
:
"
update
"
...
@@ -218,6 +219,7 @@ function enableJobChecker(jio, shared, options) {
...
@@ -218,6 +219,7 @@ function enableJobChecker(jio, shared, options) {
"
conditions
"
:
[
"
conditions
"
:
[
"
sameStorageDescription
"
,
"
sameStorageDescription
"
,
"
areWriters
"
,
"
areWriters
"
,
"
haveDocumentIds
"
,
"
sameDocumentId
"
"
sameDocumentId
"
],
],
"
action
"
:
"
wait
"
"
action
"
:
"
wait
"
...
...
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