update proctitle when worker not running

This commit is contained in:
Oliver Gorwits
2014-08-10 16:54:03 +01:00
parent 0c3675a8f4
commit b8a742e5de
2 changed files with 8 additions and 4 deletions

View File

@@ -35,8 +35,10 @@ sub worker_body {
my $self = shift;
my $wid = $self->wid;
if (setting('workers')->{'no_manager'}) {
prctl sprintf 'netdisco-daemon: worker #%s manager: shutdown', $wid;
return debug "mgr ($wid): no need for manager... quitting"
if setting('workers')->{'no_manager'};
}
my $num_slots =
MCE::Util::_parse_max_workers( setting('workers')->{tasks} )

View File

@@ -38,8 +38,10 @@ sub worker_body {
my $self = shift;
my $wid = $self->wid;
unless (setting('schedule')) {
prctl sprintf 'netdisco-daemon: worker #%s scheduler: shutdown', $wid;
return debug "sch ($wid): no need for scheduler... quitting"
unless setting('schedule');
}
while (1) {
# sleep until some point in the next minute