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

switching to having every HivePipeline object to be automatically registered...

switching to having every HivePipeline object to be automatically registered in TheApiary by default
parent 21eefd23
......@@ -3,6 +3,7 @@ package Bio::EnsEMBL::Hive::HivePipeline;
use strict;
use warnings;
use Bio::EnsEMBL::Hive::TheApiary;
use Bio::EnsEMBL::Hive::DBSQL::DBAdaptor;
use Bio::EnsEMBL::Hive::Utils ('stringify', 'destringify', 'throw');
use Bio::EnsEMBL::Hive::Utils::Collection;
......@@ -136,6 +137,8 @@ sub new { # construct an attached or a detached Pipeline object
# warn "Created a standalone pipeline";
}
Bio::EnsEMBL::Hive::TheApiary->pipelines_collection->add( $self );
return $self;
}
......
......@@ -92,13 +92,11 @@ sub find_by_url {
$no_sql_schema_version_check = 1;
}
$hive_pipeline = Bio::EnsEMBL::Hive::HivePipeline->new(
$hive_pipeline = Bio::EnsEMBL::Hive::HivePipeline->new( # calling HivePipeline->new() triggers automatic addition to TheApiary
-url => $parsed_url->{'dbconn_part'},
-disconnect_when_inactive => $disconnect_when_inactive,
-no_sql_schema_version_check=> $no_sql_schema_version_check,
);
$class->pipelines_collection->add( $hive_pipeline );
}
return $query_params
......
......@@ -241,7 +241,7 @@ sub build {
$self->graph->cluster_2_nodes( \%cluster_2_nodes );
if( $self->config_get('DisplayDetails') ) {
foreach my $pipeline ( $main_pipeline, Bio::EnsEMBL::Hive::TheApiary->pipelines_collection->list ) {
foreach my $pipeline ( Bio::EnsEMBL::Hive::TheApiary->pipelines_collection->list ) {
my $pipeline_cluster_name = _cluster_name( $pipeline->hive_pipeline_name );
$self->graph->cluster_2_attributes->{ $pipeline_cluster_name }{ 'display_cluster_name' } = 1;
$self->graph->cluster_2_attributes->{ $pipeline_cluster_name }{ 'style' } = 'bold,filled';
......
......@@ -135,9 +135,8 @@ if(0) {
$self->{'graph'}->cluster_2_attributes->{ $main_pipeline->hive_pipeline_name }{ 'fill_colour_pair' } = ['pastel19', 3];
my @other_pipeline_colour_pairs = ( ['pastel19', 8], ['pastel19', 5], ['pastel19', 6], ['pastel19', 1] );
# now rotate through the list:
# now rotate through the list of the non-reference pipelines:
foreach my $other_pipeline ( @{ Bio::EnsEMBL::Hive::TheApiary->pipelines_except($main_pipeline) } ) {
next if($other_pipeline->display_name eq $main_pipeline->display_name); # the main_pipeline got registered, filter it out
my $colour_pair = shift @other_pipeline_colour_pairs;
$self->{'graph'}->cluster_2_attributes->{ $other_pipeline->hive_pipeline_name }{ 'style' } = 'bold,filled';
......
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