Commit 7f441172 authored by Albert Vilella's avatar Albert Vilella
Browse files

adding remove_analysis option -- adding remove_all synonymous

parent 88c04ec5
......@@ -70,7 +70,8 @@ GetOptions('help' => \$help,
'logic_name=s' => \$self->{'logic_name'},
'failed_jobs' => \$self->{'show_failed_jobs'},
'reset_job_id=i' => \$self->{'reset_job_id'},
'reset_all_jobs_for_analysis=s' => \$self->{'reset_all_jobs_for_analysis'},
'reset_all|reset_all_jobs_for_analysis=s' => \$self->{'reset_all_jobs_for_analysis'},
'remove|remove_analysis_id=s' => \$self->{'remove_analysis_id'},
'lsf_options=s' => \$self->{'lsf_options'},
'job_output=i' => \$self->{'show_job_output'},
'regfile=s' => \$regfile,
......@@ -127,6 +128,8 @@ if($self->{'show_job_output'}) { print_job_output($self); }
if($self->{'reset_all_jobs_for_analysis'}) { reset_all_jobs_for_analysis($self); }
if($self->{'remove_analysis_id'}) { remove_analysis_id($self); }
if($self->{'all_dead'}) { register_all_workers_dead($self, $queen); }
if($self->{'check_for_dead'}) { check_for_dead_workers($self, $queen); }
......@@ -567,3 +570,12 @@ sub reset_all_jobs_for_analysis {
$self->{'dba'}->get_Queen->synchronize_AnalysisStats($analysis->stats);
}
sub remove_analysis_id {
my $self = shift;
my $analysis = $self->{'dba'}->get_AnalysisAdaptor->
fetch_by_dbID($self->{'remove_analysis_id'});
$self->{'dba'}->get_AnalysisJobAdaptor->remove_analysis_id($analysis->dbID);
}
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