Skip to content
Snippets Groups Projects
Commit 32f96923 authored by Jessica Severin's avatar Jessica Severin
Browse files

added method AnalysisJobAdaptor::reclaim_job which is used when a worker

is asked to 're-run' a specific job.  By reclaiming, this job is properly
processed so when it finishes it looks like it was run normally by the system.
parent 534bd240
No related branches found
No related tags found
No related merge requests found
......@@ -378,6 +378,23 @@ sub update_status {
$sth->finish;
}
sub reclaim_job {
my $self = shift;
my $job = shift;
my $ug = new Data::UUID;
my $uuid = $ug->create();
$job->job_claim($ug->to_string( $uuid ));
my $sql = "UPDATE analysis_job SET status='CLAIMED', job_claim=?, hive_id=? WHERE analysis_job_id=?";
#print("$sql\n");
my $sth = $self->prepare($sql);
$sth->execute($job->job_claim, $job->hive_id, $job->dbID);
$sth->finish;
}
=head2 store_out_files
Arg [1] : Bio::EnsEMBL::Hive::AnalysisJob $job
......@@ -432,6 +449,7 @@ sub claim_jobs_for_worker {
return $claim;
}
=head2 reset_dead_jobs_for_worker
Arg [1] : Bio::EnsEMBL::Hive::Worker object
......
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