Commit 158bd88c authored by Leo Gordon's avatar Leo Gordon
Browse files

bugfix: do not forget PRE_- and POST_CLEANUP states

parent 9e94b16c
......@@ -541,7 +541,7 @@ sub reclaim_job_for_worker {
Description: If a worker has died some of its jobs need to be reset back to 'READY'
so they can be rerun.
Jobs in state CLAIMED as simply reset back to READY.
If jobs was in a 'working' state (COMPILATION, FETCH_INPUT, RUN, WRITE_OUTPUT)
If jobs was 'in progress' (COMPILATION, PRE_CLEANUP, FETCH_INPUT, RUN, WRITE_OUTPUT, POST_CLEANUP)
the retry_count is increased and the status set back to READY.
If the retry_count >= $max_retry_count (3 by default) the job is set
to 'FAILED' and not rerun again.
......@@ -569,7 +569,7 @@ sub release_undone_jobs_from_worker {
SELECT job_id
FROM job
WHERE worker_id='$worker_id'
AND status in ('COMPILATION','FETCH_INPUT','RUN','WRITE_OUTPUT')
AND status in ('COMPILATION','PRE_CLEANUP','FETCH_INPUT','RUN','WRITE_OUTPUT','POST_CLEANUP')
} );
$sth->execute();
......@@ -616,7 +616,7 @@ sub release_and_age_job {
SET status=(CASE WHEN $may_retry AND (retry_count<$max_retry_count) THEN 'READY' ELSE 'FAILED' END),
retry_count=retry_count+1
WHERE job_id=$job_id
AND status in ('COMPILATION','FETCH_INPUT','RUN','WRITE_OUTPUT')
AND status in ('COMPILATION','PRE_CLEANUP','FETCH_INPUT','RUN','WRITE_OUTPUT','POST_CLEANUP')
} );
}
......
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