move status update to job class
This commit is contained in:
@@ -22,7 +22,7 @@ has 'jobstat' => (
|
||||
|
||||
after 'run', 'run_workers' => sub {
|
||||
my $self = shift;
|
||||
$self->jobstat->update_job($self->job);
|
||||
$self->job->update_status($self->jobstat);
|
||||
};
|
||||
|
||||
# mixin code to run workers loaded via plugins
|
||||
|
||||
@@ -67,17 +67,4 @@ sub status {
|
||||
);
|
||||
}
|
||||
|
||||
=head2 update_job
|
||||
|
||||
Updates an L<App::Netdisco::Backend::Job> with status and log.
|
||||
|
||||
=cut
|
||||
|
||||
sub update_job {
|
||||
my $self = shift;
|
||||
my $job = shift or return;
|
||||
$job->status( $self->status );
|
||||
$job->log( $self->log );
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user