cancel jobs when it is known fresh device is already discovered

This commit is contained in:
Oliver Gorwits
2018-02-11 11:16:14 +00:00
parent 147c02a956
commit d3c83c395d
4 changed files with 34 additions and 7 deletions

View File

@@ -36,6 +36,8 @@ register 'register_worker' => sub {
debug sprintf '-> run worker %s/%s/%s',
@$workerconf{qw/phase namespace priority/};
return if $job->is_cancelled;
# check to see if this namespace has already passed at higher priority
# and also update job's record of namespace and priority
return $job->add_status( Status->info('skip: namespace passed at higher priority') )