Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio_mebibou
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
Alexandra Rogova
jio_mebibou
Commits
1f8d543b
Commit
1f8d543b
authored
Aug 22, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JIO job management does not recover waiting jobs -> fixed
parent
6d56aa38
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
src/jio/features/jobRecovery.js
src/jio/features/jobRecovery.js
+2
-1
src/jio/features/jobRetry.js
src/jio/features/jobRetry.js
+1
-1
test/jio/tests.js
test/jio/tests.js
+4
-4
No files found.
src/jio/features/jobRecovery.js
View file @
1f8d543b
...
@@ -46,7 +46,8 @@ function enableJobRecovery(jio, shared, options) {
...
@@ -46,7 +46,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
'
||
job_array
[
i
].
state
===
'
waiting
'
)
{
delay
=
numberOrDefault
(
job_array
[
i
].
timeout
+
recovery_delay
,
delay
=
numberOrDefault
(
job_array
[
i
].
timeout
+
recovery_delay
,
recovery_delay
);
recovery_delay
);
deadline
=
new
Date
(
job_array
[
i
].
modified
).
getTime
()
+
delay
;
deadline
=
new
Date
(
job_array
[
i
].
modified
).
getTime
()
+
delay
;
...
...
src/jio/features/jobRetry.js
View file @
1f8d543b
...
@@ -70,7 +70,7 @@ function enableJobRetry(jio, shared, options) {
...
@@ -70,7 +70,7 @@ function enableJobRetry(jio, shared, options) {
param
.
max_retry
>
param
.
tried
)
{
param
.
max_retry
>
param
.
tried
)
{
param
.
state
=
'
waiting
'
;
param
.
state
=
'
waiting
'
;
param
.
modified
=
new
Date
();
param
.
modified
=
new
Date
();
shared
.
emit
(
'
jobSt
ateChange
'
,
param
);
shared
.
emit
(
'
jobSt
op
'
,
param
);
setTimeout
(
function
()
{
setTimeout
(
function
()
{
param
.
state
=
'
ready
'
;
param
.
state
=
'
ready
'
;
param
.
modified
=
new
Date
();
param
.
modified
=
new
Date
();
...
...
test/jio/tests.js
View file @
1f8d543b
...
@@ -843,21 +843,21 @@
...
@@ -843,21 +843,21 @@
"
workspace
"
:
workspace
"
workspace
"
:
workspace
});
});
clock
.
tick
(
1799
8
);
// now: 19999
ms
clock
.
tick
(
1799
9
);
// now: 20000
ms
if
(
fakestorage
[
'
Job Recove/post
'
])
{
if
(
fakestorage
[
'
Job Recove/post
'
])
{
ok
(
false
,
"
Command called, job recovered to earlier
"
);
ok
(
false
,
"
Command called, job recovered to earlier
"
);
}
}
clock
.
tick
(
1
);
// now: 2000
0
ms
clock
.
tick
(
1
);
// now: 2000
1
ms
if
(
!
fakestorage
[
'
Job Recove/post
'
])
{
if
(
!
fakestorage
[
'
Job Recove/post
'
])
{
ok
(
false
,
"
Command not called, job recovery failed
"
);
ok
(
false
,
"
Command not called, job recovery failed
"
);
}
else
{
}
else
{
ok
(
true
,
"
Command called, job recovery ok
"
);
ok
(
true
,
"
Command called, job recovery ok
"
);
}
}
fakestorage
[
'
Job Recove/post
'
].
success
({
"
id
"
:
"
a
"
});
fakestorage
[
'
Job Recove/post
'
].
success
({
"
id
"
:
"
a
"
});
clock
.
tick
(
1
);
// now: 2000
1
ms
clock
.
tick
(
1
);
// now: 2000
2
ms
deepEqual
(
workspace
,
{},
'
No more job in the queue
'
);
deepEqual
(
workspace
,
{},
'
No more job in the queue
'
);
clock
.
tick
(
7999
9
);
// now: 100000 ms
clock
.
tick
(
7999
8
);
// now: 100000 ms
//////////////////////////////
//////////////////////////////
// XXX Waiting for jobs job recovery
// XXX Waiting for jobs job recovery
...
...
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