use run() mixin to exec action

This commit is contained in:
Oliver Gorwits
2017-09-03 19:04:20 +01:00
parent e0a666668a
commit 49b5274c33
2 changed files with 5 additions and 20 deletions

View File

@@ -105,13 +105,7 @@ unless ($action) {
use App::Netdisco::Util::Device
qw/get_device delete_device renumber_device/;
with 'App::Netdisco::Backend::Worker::Poller::Device';
with 'App::Netdisco::Backend::Worker::Poller::Arpnip';
with 'App::Netdisco::Backend::Worker::Poller::Macsuck';
with 'App::Netdisco::Backend::Worker::Poller::Nbtstat';
with 'App::Netdisco::Backend::Worker::Poller::Expiry';
with 'App::Netdisco::Backend::Worker::Interactive::DeviceActions';
with 'App::Netdisco::Backend::Worker::Interactive::PortActions';
with 'App::Netdisco::Backend::Runner';
eval { Module::Load::load 'App::Netdisco::Util::Graph' };
sub graph {
@@ -257,8 +251,7 @@ foreach my $host (@hostlist) {
try {
info sprintf '%s: %s started at %s',
$action, $actiontext, scalar localtime;
my $status = $worker->$action($job); # TODO
$status->update_job($job);
$worker->run($job);
}
catch {
$job->status('error');