Daemon crash when restarting with in-progress jobs and many workers

This commit is contained in:
Oliver Gorwits
2014-07-31 00:55:56 +01:00
parent 8e35a7158e
commit 2402855797
4 changed files with 19 additions and 4 deletions

View File

@@ -38,7 +38,7 @@ my $mce = MCE->new(
job_delay => 1.15,
tmp_dir => $tmp_dir,
user_func => sub { $_[0]->worker_body },
on_post_exit => \&restart_worker,
on_post_exit => \&restart_this_worker,
user_tasks => build_tasks_list(),
)->run();
@@ -97,7 +97,7 @@ sub worker_factory {
};
}
sub restart_worker {
sub restart_this_worker {
my ($self, $e) = @_;
reset_jobs($e->{wid});