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

added methods reset_job and global_cleanup to...

added methods reset_job and global_cleanup to Bio::EnsEMBL::Pipeline::RunnableDB via category extension.
Worker calls global_cleanup on it's runnableDB after all jobs are done.
parent a58579dd
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,7 @@ use strict;
use Bio::EnsEMBL::Analysis;
use Bio::EnsEMBL::DBSQL::DBConnection;
use Bio::EnsEMBL::DBSQL::AnalysisAdaptor;
use Bio::EnsEMBL::Pipeline::RunnableDB;
=head2 runnableDB
......@@ -147,5 +148,18 @@ sub Bio::EnsEMBL::Analysis::stats
return $stats;
}
sub Bio::EnsEMBL::Pipeline::RunnableDB::reset_job
{
my $self = shift;
return 1;
}
sub Bio::EnsEMBL::Pipeline::RunnableDB::global_cleanup
{
my $self = shift;
return 1;
}
1;
......@@ -310,6 +310,8 @@ sub run
}
if($self->cause_of_death) { $alive=undef; }
}
#have runnable cleanup any global/process files/data it may have created
$self->analysis->runnableDB->global_cleanup();
$self->queen->register_worker_death($self);
......@@ -345,7 +347,7 @@ sub run_module_with_job
$job->status('WRITE_OUTPUT');
my $branch_code = $runObj->write_output;
#runnableDB is allowed to alter it is input_id on output
#runnableDB is allowed to alter its input_id on output
#This modified input_id is passed as input to the next jobs in the graph
$job->input_id($runObj->input_id);
$job->branch_code($branch_code);
......
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