Commit 5304bc3f authored by Jessica Severin's avatar Jessica Severin
Browse files

added method reset_job which can be used to hard reset a job so it can run again.

Initially used to manually re-run a job with runWorker.pl -job_id
parent 9270ced7
......@@ -447,6 +447,21 @@ sub reset_dead_jobs_for_worker {
}
sub reset_job {
my $self = shift;
my $job = shift;
throw("must define job") unless($job);
my ($sql, $sth);
#first just reset the claimed jobs, these don't need a retry_count index increment
$sql = "UPDATE analysis_job SET job_claim='', status='READY' WHERE analysis_job_id=?";
$sth = $self->prepare($sql);
$sth->execute($job->dbID);
$sth->finish;
#print(" done update CLAIMED\n");
}
1;
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