Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio-main
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
Hardik Juneja
jio-main
Commits
fdcffe5b
Commit
fdcffe5b
authored
Oct 11, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
job rule condition added + default job rules modified
parent
830ff681
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
src/jio/core/globals.js
src/jio/core/globals.js
+18
-0
src/jio/features/jobChecker.js
src/jio/features/jobChecker.js
+2
-1
No files found.
src/jio/core/globals.js
View file @
fdcffe5b
...
@@ -387,6 +387,23 @@ defaults.job_rule_conditions = {};
...
@@ -387,6 +387,23 @@ defaults.job_rule_conditions = {};
methodType
(
b
.
method
)
===
'
writer
'
;
methodType
(
b
.
method
)
===
'
writer
'
;
}
}
/**
* Compare two jobs and test if they use metadata only
*
* @param {Object} a The first job to compare
* @param {Object} b The second job to compare
* @return {Boolean} True if equal, else false
*/
function
useMetadataOnly
(
a
,
b
)
{
if
([
'
post
'
,
'
put
'
,
'
get
'
,
'
remove
'
,
'
allDocs
'
].
indexOf
(
a
.
method
)
===
-
1
)
{
return
false
;
}
if
([
'
post
'
,
'
put
'
,
'
get
'
,
'
remove
'
,
'
allDocs
'
].
indexOf
(
b
.
method
)
===
-
1
)
{
return
false
;
}
return
true
;
}
/**
/**
* Compare two jobs and test if they are readers
* Compare two jobs and test if they are readers
*
*
...
@@ -466,6 +483,7 @@ defaults.job_rule_conditions = {};
...
@@ -466,6 +483,7 @@ defaults.job_rule_conditions = {};
"
sameStorageDescription
"
:
sameStorageDescription
,
"
sameStorageDescription
"
:
sameStorageDescription
,
"
areWriters
"
:
areWriters
,
"
areWriters
"
:
areWriters
,
"
areReaders
"
:
areReaders
,
"
areReaders
"
:
areReaders
,
"
useMetadataOnly
"
:
useMetadataOnly
,
"
sameMethod
"
:
sameMethod
,
"
sameMethod
"
:
sameMethod
,
"
sameDocumentId
"
:
sameDocumentId
,
"
sameDocumentId
"
:
sameDocumentId
,
"
sameParameters
"
:
sameParameters
,
"
sameParameters
"
:
sameParameters
,
...
...
src/jio/features/jobChecker.js
View file @
fdcffe5b
...
@@ -213,10 +213,11 @@ function enableJobChecker(jio, shared, options) {
...
@@ -213,10 +213,11 @@ function enableJobChecker(jio, shared, options) {
],
],
"
action
"
:
"
update
"
"
action
"
:
"
update
"
},
{
},
{
"
code_name
"
:
"
writers update
"
,
"
code_name
"
:
"
metadata
writers update
"
,
"
conditions
"
:
[
"
conditions
"
:
[
"
sameStorageDescription
"
,
"
sameStorageDescription
"
,
"
areWriters
"
,
"
areWriters
"
,
"
useMetadataOnly
"
,
"
sameMethod
"
,
"
sameMethod
"
,
"
haveDocumentIds
"
,
"
haveDocumentIds
"
,
"
sameParameters
"
"
sameParameters
"
...
...
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