Skip to content
Snippets Groups Projects
Commit 293b8b25 authored by Leo Gordon's avatar Leo Gordon
Browse files

cosmetic: reordered conditions to simplify the control flow logic

parent 5344cf27
No related branches found
No related tags found
No related merge requests found
......@@ -515,16 +515,14 @@ sub run {
}
}
if( $self->cause_of_death() =~ /^(NO_WORK|HIVE_OVERLOAD)$/ ) {
if( $self->cause_of_death() eq 'NO_WORK') {
$self->adaptor->db->get_AnalysisStatsAdaptor->update_status( $self->current_role->analysis_id, 'ALL_CLAIMED' );
}
if( $self->can_respecialize and !$specialization_arglist ) {
$self->cause_of_death(undef);
$self->adaptor->db->get_AnalysisStatsAdaptor->decrease_running_workers( $self->current_role->analysis->dbID ); # FIXME: tidy up this counting of active roles
$self->specialize_and_compile_wrapper();
}
if( $self->cause_of_death() eq 'NO_WORK') {
$self->adaptor->db->get_AnalysisStatsAdaptor->update_status( $self->current_role->analysis_id, 'ALL_CLAIMED' );
}
if( $self->cause_of_death() =~ /^(NO_WORK|HIVE_OVERLOAD)$/ and $self->can_respecialize and !$specialization_arglist ) {
$self->adaptor->db->get_AnalysisStatsAdaptor->decrease_running_workers( $self->current_role->analysis->dbID ); # FIXME: tidy up this counting of active roles
$self->cause_of_death(undef);
$self->specialize_and_compile_wrapper();
}
} # /Worker's lifespan loop
......
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