Commit 2294feac authored by Leo Gordon's avatar Leo Gordon
Browse files

storing "synchronized" analyses means we don't need to adjust counters when...

storing "synchronized" analyses means we don't need to adjust counters when storing jobs ; generate_graph -pipeconfig gets correct counts
parent 13f17825
......@@ -110,7 +110,7 @@ sub save_collections_to_dba {
my $job_adaptor = $hive_dba->get_AnalysisJobAdaptor;
foreach my $analysis ( Bio::EnsEMBL::Hive->collection('Analysis')->list ) {
if(my $our_jobs = $analysis->jobs_collection ) {
$job_adaptor->store_jobs_and_adjust_counters( $our_jobs );
$job_adaptor->store( $our_jobs );
foreach my $job (@$our_jobs) {
# warn "Stored ".$job->toString()."\n";
}
......
......@@ -523,6 +523,7 @@ sub add_objects_from_config {
}
my $analysis = Bio::EnsEMBL::Hive->collection('Analysis')->find_one_by('logic_name', $logic_name); # the analysis with this logic_name may have already been stored in the db
my $stats;
if( $analysis ) {
warn "Skipping creation of already existing analysis '$logic_name'.\n";
......@@ -557,7 +558,7 @@ sub add_objects_from_config {
);
$analysis->get_compiled_module_name(); # check if it compiles and is named correctly
my $stats = Bio::EnsEMBL::Hive::AnalysisStats->new(
$stats = Bio::EnsEMBL::Hive::AnalysisStats->new(
'analysis' => $analysis,
'batch_size' => $batch_size,
'hive_capacity' => $hive_capacity,
......@@ -586,6 +587,8 @@ sub add_objects_from_config {
'analysis' => $analysis,
'input_id' => $_, # input_ids are now centrally stringified in the AnalysisJob itself
) } @$input_ids;
$stats->recalculate_from_job_counts( { 'READY' => scalar(@$input_ids) } );
}
}
warn "Done.\n\n";
......
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