From 54230ece96ce3cd309616df07e316da3f0e64c40 Mon Sep 17 00:00:00 2001 From: Leo Gordon <lg4@ebi.ac.uk> Date: Wed, 16 Jun 2010 10:01:40 +0000 Subject: [PATCH] removed the old "did" compatibility mode --- modules/Bio/EnsEMBL/Hive/RunnableDB/SqlCmd.pm | 16 ++-------------- modules/Bio/EnsEMBL/Hive/RunnableDB/SystemCmd.pm | 16 ++-------------- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/modules/Bio/EnsEMBL/Hive/RunnableDB/SqlCmd.pm b/modules/Bio/EnsEMBL/Hive/RunnableDB/SqlCmd.pm index b19ef1439..6a6e9d8f9 100755 --- a/modules/Bio/EnsEMBL/Hive/RunnableDB/SqlCmd.pm +++ b/modules/Bio/EnsEMBL/Hive/RunnableDB/SqlCmd.pm @@ -21,7 +21,7 @@ This RunnableDB module acts as a wrapper for a (My)SQL command run against either the current hive database (default) or against one specified by connection parameters. If you behave you may also use parameter substitution. -The SQL command(s) can be given using three different syntaxes: +The SQL command(s) can be given using two different syntaxes: 1) Sql command is stored in the input_id() or parameters() as the value corresponding to the 'sql' key. THIS IS THE RECOMMENDED WAY as it allows to pass in other parameters and use the parameter substitution mechanism in its full glory. @@ -30,11 +30,6 @@ The SQL command(s) can be given using three different syntaxes: (only works with sql commands shorter than 255 bytes). This is a legacy syntax. Most people tend to use it not realizing there are other possiblities. -3) A numeric key to the analysis_data table (where the actual sql command is stored) - is kept in the input_id() or parameters() as the value corresponding to the 'did' key. This allows to overcome the 255 byte limit. - Well, if you REALLY couldn't fit your sql command into 250~ish bytes, are you sure you can manage big pipelines? - Just joking :) - =head1 CONTACT Please contact ehive-users@ebi.ac.uk mailing list with questions/suggestions. @@ -46,7 +41,6 @@ package Bio::EnsEMBL::Hive::RunnableDB::SqlCmd; use strict; use DBI; -use Bio::EnsEMBL::Hive::DBSQL::AnalysisDataAdaptor; use base ('Bio::EnsEMBL::Hive::ProcessWithParams'); @@ -69,10 +63,6 @@ sub strict_hash_format { param('sql'): The recommended way of passing in the sql command(s). - param('did'): Alternative way of passing in a long sql command that is stored in analysis_data table. - Try to avoid long sql commands at all costs, as it makes debugging a nightmare. - Keep in mind that parameter substitution mechanism can be used to compose longer strings from shorter ones. - param('db_conn'): An optional hash to pass in connection parameters to the database upon which the sql command(s) will have to be run. param('*'): Any other parameters can be freely used for parameter substitution. @@ -87,9 +77,7 @@ sub fetch_input { my $sql = ($self->input_id()!~/^\{.*\}$/) ? $self->input_id() # assume the sql command is given in input_id : $self->param('sql') # or defined as a hash value (in input_id or parameters) - or $self->param('did') # or referred to the analysis_data table where longer strings can be stored - ? $self->db->get_AnalysisDataAdaptor->fetch_by_dbID( $self->param('did') ) - : die "Could not find the command defined in input_id(), param('sql') or param('did')"; + or die "Could not find the command defined in param('sql') or input_id()"; # Store the sql command array: # diff --git a/modules/Bio/EnsEMBL/Hive/RunnableDB/SystemCmd.pm b/modules/Bio/EnsEMBL/Hive/RunnableDB/SystemCmd.pm index d77732231..1cbced240 100755 --- a/modules/Bio/EnsEMBL/Hive/RunnableDB/SystemCmd.pm +++ b/modules/Bio/EnsEMBL/Hive/RunnableDB/SystemCmd.pm @@ -19,7 +19,7 @@ Please refer to Bio::EnsEMBL::Hive::PipeConfig::* pipeline configuration files t This RunnableDB module acts as a wrapper for shell-level command lines. If you behave you may also use parameter substitution. -The command can be given using three different syntaxes: +The command can be given using two different syntaxes: 1) Command line is stored in the input_id() or parameters() as the value corresponding to the 'cmd' key. THIS IS THE RECOMMENDED WAY as it allows to pass in other parameters and use the parameter substitution mechanism in its full glory. @@ -28,11 +28,6 @@ The command can be given using three different syntaxes: (only works with command lines shorter than 255 bytes). This is a legacy syntax. Most people tend to use it not realizing there are other possiblities. -3) A numeric key to the analysis_data table (where the actual command line is stored) - is kept in the input_id() or parameters() as the value corresponding to the 'did' key. This allows to overcome the 255 byte limit. - Well, if you REALLY couldn't fit your command line into 250~ish bytes, are you sure you can manage big pipelines? - Just joking :) - =head1 CONTACT Please contact ehive-users@ebi.ac.uk mailing list with questions/suggestions. @@ -43,7 +38,6 @@ The command can be given using three different syntaxes: package Bio::EnsEMBL::Hive::RunnableDB::SystemCmd; use strict; -use Bio::EnsEMBL::Hive::DBSQL::AnalysisDataAdaptor; use base ('Bio::EnsEMBL::Hive::ProcessWithParams'); =head2 strict_hash_format @@ -64,10 +58,6 @@ sub strict_hash_format { param('cmd'): The recommended way of passing in the command line. - param('did'): Alternative way of passing in a long command line that is stored in analysis_data table. - Try to avoid long command lines at all costs, as it makes debugging a nightmare. - Keep in mind that parameter substitution mechanism can be used to compose longer strings from shorter ones. - param('*'): Any other parameters can be freely used for parameter substitution. =cut @@ -80,9 +70,7 @@ sub fetch_input { my $cmd = ($self->input_id()!~/^\{.*\}$/) ? $self->input_id() # assume the command line is given in input_id : $self->param('cmd') # or defined as a hash value (in input_id or parameters) - or $self->param('did') # or referred to the analysis_data table where longer strings can be stored - ? $self->db->get_AnalysisDataAdaptor->fetch_by_dbID( $self->param('did') ) - : die "Could not find the command defined in input_id(), param('cmd') or param('did')"; + or die "Could not find the command defined in param('cmd') or input_id()"; # Store the value with parameter substitutions for the actual execution: # -- GitLab