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

bugfix: alldead mode did not set cause_of_death; now it sets it always to...

bugfix: alldead mode did not set cause_of_death; now it sets it always to FATALITY (yes, there is certainly a better solution)
parent 9e0451b0
No related branches found
No related tags found
No related merge requests found
......@@ -197,12 +197,12 @@ sub register_worker_death {
}
sub check_for_dead_workers {
sub check_for_dead_workers { # a bit counter-intuitively only looks for current meadow's workers, not all of the dead workers.
my ($self, $meadow, $check_buried_in_haste) = @_;
my $worker_status_hash = $meadow->status_of_all_our_workers();
my %worker_status_summary = ();
my $queen_worker_list = $self->fetch_overdue_workers(0);
my $queen_worker_list = $self->fetch_overdue_workers(0); # maybe it should return a {meadow->worker_count} hash instead?
print "====== Live workers according to Queen:".scalar(@$queen_worker_list).", Meadow:".scalar(keys %$worker_status_hash)."\n";
......@@ -808,6 +808,7 @@ sub register_all_workers_dead {
my $overdueWorkers = $self->fetch_overdue_workers(0);
foreach my $worker (@{$overdueWorkers}) {
$worker->cause_of_death( 'FATALITY' ); # well, maybe we could have investigated further...
$self->register_worker_death($worker);
}
}
......
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