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
bea691f4
Commit
bea691f4
authored
Aug 22, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JIO recovery_delay option added
parent
fcbe5d25
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
src/jio/features/jobRecovery.js
src/jio/features/jobRecovery.js
+9
-2
No files found.
src/jio/features/jobRecovery.js
View file @
bea691f4
...
@@ -30,7 +30,13 @@ function enableJobRecovery(jio, shared, options) {
...
@@ -30,7 +30,13 @@ function enableJobRecovery(jio, shared, options) {
};
};
}
}
var
i
,
job_array
,
delay
,
deadline
;
var
i
,
job_array
,
delay
,
deadline
,
recovery_delay
;
recovery_delay
=
numberOrDefault
(
options
.
recovery_delay
,
10000
);
if
(
recovery_delay
<
0
)
{
recovery_delay
=
10000
;
}
if
(
options
.
job_management
!==
false
&&
options
.
job_recovery
!==
false
)
{
if
(
options
.
job_management
!==
false
&&
options
.
job_recovery
!==
false
)
{
shared
.
job_queue
.
load
();
shared
.
job_queue
.
load
();
...
@@ -39,7 +45,8 @@ function enableJobRecovery(jio, shared, options) {
...
@@ -39,7 +45,8 @@ function enableJobRecovery(jio, shared, options) {
for
(
i
=
0
;
i
<
job_array
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
job_array
.
length
;
i
+=
1
)
{
if
(
job_array
[
i
].
state
===
'
ready
'
||
if
(
job_array
[
i
].
state
===
'
ready
'
||
job_array
[
i
].
state
===
'
running
'
)
{
job_array
[
i
].
state
===
'
running
'
)
{
delay
=
numberOrDefault
(
job_array
[
i
].
timeout
+
10000
,
10000
);
delay
=
numberOrDefault
(
job_array
[
i
].
timeout
+
recovery_delay
,
recovery_delay
);
deadline
=
new
Date
(
job_array
[
i
].
modified
).
getTime
()
+
delay
;
deadline
=
new
Date
(
job_array
[
i
].
modified
).
getTime
()
+
delay
;
if
(
!
isFinite
(
delay
))
{
if
(
!
isFinite
(
delay
))
{
// 'modified' date is broken
// 'modified' date is broken
...
...
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