Commit 46a948c3 authored by Leo Gordon's avatar Leo Gordon
Browse files

included a new -nosqlvc flag in beekeeper.pl and runWorker.pl to overcome the...

included a new -nosqlvc flag in beekeeper.pl and runWorker.pl to overcome the version restriction in non-critical cases
parent 9bd4f9e4
......@@ -71,6 +71,7 @@ sub main {
'reg_conf|regfile=s' => \$self->{'reg_conf'},
'reg_alias|regname=s'=> \$self->{'reg_alias'},
'url=s' => \$self->{'url'},
'nosqlvc' => \$self->{'nosqlvc'},
# loop control
'run' => \$run,
......@@ -135,7 +136,7 @@ sub main {
Bio::EnsEMBL::Registry->load_all($self->{'reg_conf'});
$self->{'dba'} = Bio::EnsEMBL::Registry->get_DBAdaptor($self->{'reg_alias'}, 'hive');
} elsif($self->{'url'}) {
$self->{'dba'} = Bio::EnsEMBL::Hive::DBSQL::DBAdaptor->new(-url => $self->{'url'});
$self->{'dba'} = Bio::EnsEMBL::Hive::DBSQL::DBAdaptor->new(-url => $self->{'url'}, -no_sql_schema_version_check => $self->{'nosqlvc'} );
} else {
print "\nERROR : Connection parameters (url or reg_conf+reg_alias) need to be specified\n\n";
script_usage(1);
......@@ -302,7 +303,7 @@ sub generate_worker_cmd {
$worker_cmd .= " -url '". $self->{'safe_url'} ."'";
}
foreach my $worker_option ('job_limit', 'life_span', 'retry_throwing_jobs', 'can_respecialize', 'hive_log_dir', 'debug') {
foreach my $worker_option ('nosqlvc', 'job_limit', 'life_span', 'retry_throwing_jobs', 'can_respecialize', 'hive_log_dir', 'debug') {
if(defined(my $value = $self->{$worker_option})) {
$worker_cmd .= " -${worker_option} $value";
}
......
......@@ -21,7 +21,7 @@ use Bio::EnsEMBL::Hive::Valley;
Bio::EnsEMBL::Registry->no_version_check(1);
my ($reg_conf, $reg_alias, $url); # Connection parameters
my ($reg_conf, $reg_alias, $url, $nosqlvc); # Connection parameters
my ($resource_class_id, $resource_class_name, $analysis_id, $logic_name, $job_id, $force); # Task specification parameters
my ($job_limit, $life_span, $no_cleanup, $no_write, $hive_log_dir, $worker_log_dir, $retry_throwing_jobs, $can_respecialize); # Worker control parameters
my ($help, $debug);
......@@ -32,6 +32,7 @@ GetOptions(
'reg_conf|regfile=s' => \$reg_conf,
'reg_alias|regname=s' => \$reg_alias,
'url=s' => \$url,
'nosqlvc' => \$nosqlvc,
# Task specification parameters:
'rc_id=i' => \$resource_class_id,
......@@ -76,7 +77,7 @@ if($reg_alias) {
$url =~ s/\$(\{(\w+)\})/defined($ENV{$2})?"$ENV{$2}":"\$$1"/eg;
$url =~ s/\$((\w+))/defined($ENV{$2})?"$ENV{$2}":"\$$1"/eg;
$DBA = Bio::EnsEMBL::Hive::DBSQL::DBAdaptor->new(-url => $url);
$DBA = Bio::EnsEMBL::Hive::DBSQL::DBAdaptor->new(-url => $url, -no_sql_schema_version_check => $nosqlvc);
} else {
print "\nERROR : Connection parameters (url or reg_conf+reg_alias) need to be specified\n\n";
script_usage(1);
......
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