Commit 43ac3586 authored by Leo Gordon's avatar Leo Gordon
Browse files

respect worker_id foreign key

parent 6e850bdf
......@@ -596,7 +596,7 @@ sub release_and_age_job {
# NB: The order of updated fields IS important. Here we first find out the new status and then increment the retry_count:
$self->dbc->do( qq{
UPDATE analysis_job
SET worker_id=0, job_claim='', status=IF( $may_retry AND (retry_count<$max_retry_count), 'READY', 'FAILED'), retry_count=retry_count+1
SET worker_id=NULL, job_claim='', status=IF( $may_retry AND (retry_count<$max_retry_count), 'READY', 'FAILED'), retry_count=retry_count+1
AND analysis_job_id=$job_id
} );
......@@ -645,7 +645,7 @@ sub reset_job_by_dbID {
$self->dbc->do( qq{
UPDATE analysis_job
SET worker_id=0, job_claim='', status='READY', retry_count=0
SET worker_id=NULL, job_claim='', status='READY', retry_count=0
WHERE analysis_job_id=$job_id
} );
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