rename daemon to backend in code
This commit is contained in:
@@ -24,25 +24,25 @@ use App::Netdisco;
|
||||
use Dancer qw/:moose :script/;
|
||||
warning sprintf "App::Netdisco %s backend", ($App::Netdisco::VERSION || 'HEAD');
|
||||
|
||||
use App::Netdisco::Util::Daemon;
|
||||
use App::Netdisco::Util::Backend;
|
||||
use NetAddr::IP::Lite ':lower'; # to quench AF_INET6 symbol errors
|
||||
use Role::Tiny::With;
|
||||
|
||||
# preload all worker modules into shared memory
|
||||
use App::Netdisco::Daemon::Job ();
|
||||
use App::Netdisco::Daemon::Util ();
|
||||
use App::Netdisco::Daemon::Worker::Common ();
|
||||
use App::Netdisco::Daemon::Worker::Interactive::DeviceActions ();
|
||||
use App::Netdisco::Daemon::Worker::Interactive::PortActions ();
|
||||
use App::Netdisco::Daemon::Worker::Manager ();
|
||||
use App::Netdisco::Daemon::Worker::Poller::Arpnip ();
|
||||
use App::Netdisco::Daemon::Worker::Poller::Common ();
|
||||
use App::Netdisco::Daemon::Worker::Poller::Device ();
|
||||
use App::Netdisco::Daemon::Worker::Poller::Expiry ();
|
||||
use App::Netdisco::Daemon::Worker::Poller::Macsuck ();
|
||||
use App::Netdisco::Daemon::Worker::Poller::Nbtstat ();
|
||||
use App::Netdisco::Daemon::Worker::Poller ();
|
||||
use App::Netdisco::Daemon::Worker::Scheduler ();
|
||||
use App::Netdisco::Backend::Job ();
|
||||
use App::Netdisco::Backend::Util ();
|
||||
use App::Netdisco::Backend::Worker::Common ();
|
||||
use App::Netdisco::Backend::Worker::Interactive::DeviceActions ();
|
||||
use App::Netdisco::Backend::Worker::Interactive::PortActions ();
|
||||
use App::Netdisco::Backend::Worker::Manager ();
|
||||
use App::Netdisco::Backend::Worker::Poller::Arpnip ();
|
||||
use App::Netdisco::Backend::Worker::Poller::Common ();
|
||||
use App::Netdisco::Backend::Worker::Poller::Device ();
|
||||
use App::Netdisco::Backend::Worker::Poller::Expiry ();
|
||||
use App::Netdisco::Backend::Worker::Poller::Macsuck ();
|
||||
use App::Netdisco::Backend::Worker::Poller::Nbtstat ();
|
||||
use App::Netdisco::Backend::Worker::Poller ();
|
||||
use App::Netdisco::Backend::Worker::Scheduler ();
|
||||
|
||||
use MCE::Signal '-setpgrp';
|
||||
use MCE::Flow Sereal => 1;
|
||||
@@ -54,7 +54,7 @@ my $tmp_dir = ($ENV{NETDISCO_TEMP} || dir($home, 'tmp'));
|
||||
mkdir $tmp_dir if ! -d $tmp_dir;
|
||||
|
||||
# process-table text
|
||||
prctl 'netdisco-daemon: master';
|
||||
prctl 'netdisco-backend: master';
|
||||
|
||||
# shared local job queue
|
||||
my $queue = MCE::Queue->new;
|
||||
@@ -80,12 +80,12 @@ sub _mk_wkr {
|
||||
my $self = shift;
|
||||
$self->{queue} = $queue;
|
||||
|
||||
prctl sprintf 'netdisco-daemon: worker #%s %s: init', MCE->wid, lc($role);
|
||||
prctl sprintf 'netdisco-backend: worker #%s %s: init', MCE->wid, lc($role);
|
||||
info sprintf 'applying role %s to worker %s', $role, MCE->wid;
|
||||
|
||||
# post-fork, become manager, scheduler, poller, etc
|
||||
Role::Tiny->apply_roles_to_object(
|
||||
$self => "App::Netdisco::Daemon::Worker::$role");
|
||||
$self => "App::Netdisco::Backend::Worker::$role");
|
||||
|
||||
$self->worker_begin if $self->can('worker_begin');
|
||||
$self->worker_body;
|
||||
@@ -94,7 +94,7 @@ sub _mk_wkr {
|
||||
|
||||
=head1 NAME
|
||||
|
||||
netdisco-daemon-fg - Job Control for Netdisco
|
||||
netdisco-backend-fg - Job Control for Netdisco
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
|
||||
Reference in New Issue
Block a user