better log messages during worker running
This commit is contained in:
@@ -36,9 +36,10 @@ register 'register_worker' => sub {
|
|||||||
debug sprintf '-> run worker %s/%s/%s',
|
debug sprintf '-> run worker %s/%s/%s',
|
||||||
@$workerconf{qw/phase namespace priority/};
|
@$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
|
# 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
|
# support part-actions via action::namespace
|
||||||
if ($job->only_namespace and $workerconf->{phase} ne 'check') {
|
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 $no = (exists $workerconf->{no} ? $workerconf->{no} : undef);
|
||||||
my $only = (exists $workerconf->{only} ? $workerconf->{only} : 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))
|
if ($no and check_acl_no($job->device, $no))
|
||||||
or ($only and not check_acl_only($job->device, $only));
|
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
|
# 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;
|
if 0 == scalar @newuserconf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user