better log messages during worker running

This commit is contained in:
Oliver Gorwits
2018-02-01 20:38:32 +00:00
parent 35980ba0cd
commit 60b8705496

View File

@@ -36,9 +36,10 @@ register 'register_worker' => sub {
debug sprintf '-> run worker %s/%s/%s',
@$workerconf{qw/phase namespace priority/};
# update job's record of namespace and priority
# check to see if this namespace has already passed at higher priority
return if $job->namespace_passed($workerconf);
# and also update job's record of namespace and priority
return $job->add_status( Status->info('skip: namespace passed at higher priority') )
if $job->namespace_passed($workerconf);
# support part-actions via action::namespace
if ($job->only_namespace and $workerconf->{phase} ne 'check') {
@@ -55,7 +56,7 @@ register 'register_worker' => sub {
my $no = (exists $workerconf->{no} ? $workerconf->{no} : undef);
my $only = (exists $workerconf->{only} ? $workerconf->{only} : undef);
return $job->add_status( Status->info('worker not applicable to this device') )
return $job->add_status( Status->info('skip: acls restricted') )
if ($no and check_acl_no($job->device, $no))
or ($only and not check_acl_only($job->device, $only));
@@ -72,7 +73,7 @@ register 'register_worker' => sub {
}
# per-device action but no device creds available
return $job->add_status( Status->info('worker driver or action not applicable') )
return $job->add_status( Status->info('skip: driver or action not applicable') )
if 0 == scalar @newuserconf;
}