Commit df91e74f authored by Leo Gordon's avatar Leo Gordon
Browse files

api_change: Runnable/Process no longer caches a reference to Analysis. It can...

api_change: Runnable/Process no longer caches a reference to Analysis. It can be had via $runnable_object->input_job->analysis if needed.
parent 0c646bbf
......@@ -141,27 +141,6 @@ sub get_compiled_module_name {
}
=head2 process
Arg [1] : none
Example : $process = $analysis->process;
Description: construct a Process object from the $analysis->module name
Returntype : Bio::EnsEMBL::Hive::Process subclass
Exceptions : none
Caller : general
=cut
sub process {
my $self = shift;
my $runnable_object = $self->get_compiled_module_name->new();
$runnable_object->analysis( $self );
return $runnable_object;
}
=head2 url
Arg [1] : none
......
......@@ -12,8 +12,8 @@
AnalysisCtrl rules.
Instances of these Processes are created by the system as work is done.
The newly created Process will have preset $self->db, $self->dbc,
$self->input_id, $self->analysis and several other variables.
The newly created Process will have preset $self->db, $self->dbc, $self->input_id
and several other variables.
From this input and configuration data, each Process can then proceed to
do something. The flow of execution within a Process is:
pre_cleanup() if($retry_count>0); # clean up databases/filesystem before subsequent attempts
......@@ -252,10 +252,9 @@ sub param_defaults {
Title : fetch_input
Function: sublcass can implement functions related to data fetching.
Typical acivities would be to parse $self->input_id and read
configuration information from $self->analysis. Subclasses
may also want to fetch data from databases or from files
within this function.
Typical acivities would be to parse $self->input_id .
Subclasses may also want to fetch data from databases
or from files within this function.
=cut
......@@ -414,27 +413,6 @@ sub data_dbc {
}
=head2 analysis
Title : analysis
Usage : $self->analysis;
Function: Returns the Analysis object associated with this
instance of the Process.
Returns : Bio::EnsEMBL::Hive::Analysis object
=cut
sub analysis {
my ($self, $analysis) = @_;
if($analysis) {
throw("Not a Bio::EnsEMBL::Hive::Analysis object")
unless ($analysis->isa("Bio::EnsEMBL::Hive::Analysis"));
$self->{'_analysis'} = $analysis;
}
return $self->{'_analysis'};
}
=head2 input_job
Title : input_job
......
......@@ -581,7 +581,10 @@ sub specialize_and_compile_wrapper {
if( !$self->cause_of_death() ) {
eval {
$self->enter_status('COMPILATION');
my $runnable_object = $self->current_role->analysis->process or die "Unknown compilation error";
my $runnable_object = $self->current_role->analysis->get_compiled_module_name->new()
or die "Unknown compilation error";
$runnable_object->db( $self->adaptor->db );
$runnable_object->worker( $self );
$runnable_object->debug( $self->debug );
......
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