Commit bea691f4 authored by Tristan Cavelier's avatar Tristan Cavelier

JIO recovery_delay option added

parent fcbe5d25
...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment