Commit 34bb2acd authored by Leo Gordon's avatar Leo Gordon
Browse files

more visual result of sync

parent 7b84ec87
......@@ -345,10 +345,10 @@ sub check_blocking_control_rules {
my $ctrl_rules = $self->adaptor->db->get_AnalysisCtrlRuleAdaptor->fetch_by_ctrled_analysis_id($self->analysis_id);
if(scalar @$ctrl_rules) { # there are blocking ctrl_rules to check
my $all_ctrl_rules_done = 1;
if(scalar @$ctrl_rules) { # there are blocking ctrl_rules to check
foreach my $ctrl_rule (@$ctrl_rules) {
#use this method because the condition_analysis objects can be
#network distributed to a different database so use it's adaptor to get
......@@ -358,11 +358,11 @@ sub check_blocking_control_rules {
my $condition_analysis_stats_status = $condition_analysis_stats && $condition_analysis_stats->status;
my $condition_analysis_stats_cbe = $condition_analysis_stats && $condition_analysis_stats->can_be_empty;
unless( ($condition_analysis_stats_status eq 'DONE')
or ($condition_analysis_stats_cbe and ($condition_analysis_stats_status eq 'READY'))
) {
my $unblocked_condition = ($condition_analysis_stats_status eq 'DONE')
|| ($condition_analysis_stats_cbe && ($condition_analysis_stats_status eq 'READY'));
unless( $unblocked_condition ) {
$all_ctrl_rules_done = 0;
last;
}
}
......@@ -374,6 +374,8 @@ sub check_blocking_control_rules {
$self->update_status('BLOCKED');
}
}
return $all_ctrl_rules_done;
}
......
......@@ -443,8 +443,8 @@ sub synchronize_hive {
print STDERR "Checking blocking control rules:\n";
foreach my $analysis (@$list_of_analyses) {
$analysis->stats->check_blocking_control_rules();
print STDERR '.';
my $open = $analysis->stats->check_blocking_control_rules();
print STDERR ($open ? 'o' : 'x');
}
print STDERR "\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