Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
18
Merge Requests
18
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
jio
Commits
0afd4c06
Commit
0afd4c06
authored
Sep 05, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
command.reject acts like an error or a retry according to the status code
parent
fe92a4fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
src/jio/features/jobRetry.js
src/jio/features/jobRetry.js
+8
-1
No files found.
src/jio/features/jobRetry.js
View file @
0afd4c06
/*jslint indent: 2, maxlen: 80, sloppy: true, nomen: true, unparam: true */
/*global arrayExtend, setTimeout, indexOf, min */
/*global arrayExtend, setTimeout, indexOf, min
, constants
*/
function
enableJobRetry
(
jio
,
shared
,
options
)
{
...
...
@@ -58,6 +58,13 @@ function enableJobRetry(jio, shared, options) {
defaultMaxRetry
(
param
)
);
}
param
.
command
.
reject
=
function
(
status
)
{
if
(
constants
.
http_action
[
status
||
0
]
===
"
retry
"
)
{
shared
.
emit
(
'
jobRetry
'
,
param
,
arguments
);
}
else
{
shared
.
emit
(
'
jobFail
'
,
param
,
arguments
);
}
};
param
.
command
.
retry
=
function
()
{
shared
.
emit
(
'
jobRetry
'
,
param
,
arguments
);
};
...
...
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