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

more visual result of sync

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