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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aurel
jio
Commits
b88abd84
Commit
b88abd84
authored
Oct 11, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jio.js updated
parent
1f51a2be
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
3 deletions
+24
-3
jio.js
jio.js
+24
-3
No files found.
jio.js
View file @
b88abd84
...
...
@@ -436,6 +436,24 @@ defaults.job_rule_conditions = {};
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
)
{
console
.
log
(
JSON
.
stringify
(
a
.
kwargs
),
JSON
.
stringify
(
b
.
kwargs
));
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
*
...
...
@@ -467,7 +485,8 @@ defaults.job_rule_conditions = {};
"
sameMethod
"
:
sameMethod
,
"
sameDocumentId
"
:
sameDocumentId
,
"
sameParameters
"
:
sameParameters
,
"
sameOptions
"
:
sameOptions
"
sameOptions
"
:
sameOptions
,
"
haveDocumentIds
"
:
haveDocumentIds
};
}());
...
...
@@ -1595,8 +1614,8 @@ LocalStorageArray.saveArray = function (namespace, list) {
*/
function
Metadata
(
metadata
)
{
if
(
arguments
.
length
>
0
)
{
if
(
typeof
metadata
!==
'
object
'
||
Object
.
getPrototypeOf
(
metadata
||
[])
!==
Object
.
prototype
)
{
if
(
metadata
===
null
||
typeof
metadata
!==
'
object
'
||
Array
.
isArray
(
metadata
)
)
{
throw
new
TypeError
(
"
Metadata(): Optional argument 1 is not an object
"
);
}
this
.
_dict
=
metadata
;
...
...
@@ -2485,6 +2504,7 @@ function enableJobChecker(jio, shared, options) {
"
sameStorageDescription
"
,
"
areWriters
"
,
"
sameMethod
"
,
"
haveDocumentIds
"
,
"
sameParameters
"
],
"
action
"
:
"
update
"
...
...
@@ -2493,6 +2513,7 @@ function enableJobChecker(jio, shared, options) {
"
conditions
"
:
[
"
sameStorageDescription
"
,
"
areWriters
"
,
"
haveDocumentIds
"
,
"
sameDocumentId
"
],
"
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