rename daemon to backend in code
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
package App::Netdisco::Daemon::Worker::Scheduler;
|
||||
package App::Netdisco::Backend::Worker::Scheduler;
|
||||
|
||||
use Dancer qw/:moose :syntax :script/;
|
||||
|
||||
use Algorithm::Cron;
|
||||
use App::Netdisco::Util::Daemon;
|
||||
use App::Netdisco::Util::Backend;
|
||||
|
||||
use Role::Tiny;
|
||||
use namespace::clean;
|
||||
@@ -39,7 +39,7 @@ sub worker_body {
|
||||
my $wid = $self->wid;
|
||||
|
||||
unless (setting('schedule')) {
|
||||
prctl sprintf 'netdisco-daemon: worker #%s scheduler: inactive', $wid;
|
||||
prctl sprintf 'netdisco-backend: worker #%s scheduler: inactive', $wid;
|
||||
return debug "sch ($wid): no need for scheduler... quitting"
|
||||
}
|
||||
|
||||
@@ -47,11 +47,11 @@ sub worker_body {
|
||||
# sleep until some point in the next minute
|
||||
my $naptime = 60 - (time % 60) + int(rand(45));
|
||||
|
||||
prctl sprintf 'netdisco-daemon: worker #%s scheduler: idle', $wid;
|
||||
prctl sprintf 'netdisco-backend: worker #%s scheduler: idle', $wid;
|
||||
debug "sched ($wid): sleeping for $naptime seconds";
|
||||
|
||||
sleep $naptime;
|
||||
prctl sprintf 'netdisco-daemon: worker #%s scheduler: queueing', $wid;
|
||||
prctl sprintf 'netdisco-backend: worker #%s scheduler: queueing', $wid;
|
||||
|
||||
# NB next_time() returns the next *after* win_start
|
||||
my $win_start = time - (time % 60) - 1;
|
||||
|
||||
Reference in New Issue
Block a user