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

renamed fetch_from_analysis_id_branch_code method into...

renamed fetch_from_analysis_id_branch_code method into fetch_all_by_from_analysis_id_and_branch_code
parent c9396877
...@@ -249,7 +249,7 @@ sub dataflow_output_id { ...@@ -249,7 +249,7 @@ sub dataflow_output_id {
$self->autoflow(0) if($dataflow_rule_adaptor->branch_name_2_code($branch_name_or_code)==1); $self->autoflow(0) if($dataflow_rule_adaptor->branch_name_2_code($branch_name_or_code)==1);
my @output_job_ids = (); my @output_job_ids = ();
my $rules = $dataflow_rule_adaptor->fetch_from_analysis_id_branch_code($self->analysis_id, $branch_name_or_code); my $rules = $dataflow_rule_adaptor->fetch_all_by_from_analysis_id_and_branch_code($self->analysis_id, $branch_name_or_code);
foreach my $rule (@$rules) { foreach my $rule (@$rules) {
my $output_ids_for_this_rule; my $output_ids_for_this_rule;
......
...@@ -623,7 +623,7 @@ sub release_and_age_job { ...@@ -623,7 +623,7 @@ sub release_and_age_job {
sub gc_dataflow { sub gc_dataflow {
my ($self, $analysis_id, $job_id, $branch_name) = @_; my ($self, $analysis_id, $job_id, $branch_name) = @_;
unless(@{ $self->db->get_DataflowRuleAdaptor->fetch_from_analysis_id_branch_code($analysis_id, $branch_name) }) { unless(@{ $self->db->get_DataflowRuleAdaptor->fetch_all_by_from_analysis_id_and_branch_code($analysis_id, $branch_name) }) {
return 0; # no corresponding gc_dataflow rule has been defined return 0; # no corresponding gc_dataflow rule has been defined
} }
......
...@@ -69,10 +69,10 @@ sub branch_name_2_code { ...@@ -69,10 +69,10 @@ sub branch_name_2_code {
return defined($branch_code) ? $branch_code : die "Could not map the branch_name '$branch_name_or_code' to the internal code"; return defined($branch_code) ? $branch_code : die "Could not map the branch_name '$branch_name_or_code' to the internal code";
} }
=head2 fetch_from_analysis_id_branch_code =head2 fetch_all_by_from_analysis_id_and_branch_code
Args : unsigned int $analysis_id, unsigned int $branch_code Args : unsigned int $analysis_id, unsigned int $branch_code
Example : my @rules = @{$ruleAdaptor->fetch_from_analysis_id_branch_code($analysis_id, $branch_code)}; Example : my @rules = @{$ruleAdaptor->fetch_all_by_from_analysis_id_and_branch_code($analysis_id, $branch_code)};
Description: searches database for rules with given from_analysis_id and branch_code Description: searches database for rules with given from_analysis_id and branch_code
and returns all such rules in a list (by reference) and returns all such rules in a list (by reference)
Returntype : reference to list of Bio::EnsEMBL::Hive::DataflowRule objects Returntype : reference to list of Bio::EnsEMBL::Hive::DataflowRule objects
...@@ -81,7 +81,7 @@ sub branch_name_2_code { ...@@ -81,7 +81,7 @@ sub branch_name_2_code {
=cut =cut
sub fetch_from_analysis_id_branch_code { sub fetch_all_by_from_analysis_id_and_branch_code {
my ($self, $analysis_id, $branch_name_or_code) = @_; my ($self, $analysis_id, $branch_name_or_code) = @_;
return [] unless($analysis_id); return [] unless($analysis_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