move status update to job class

This commit is contained in:
Oliver Gorwits
2017-09-05 20:41:05 +01:00
parent c8e5cea4ed
commit cd71a0b7a8
3 changed files with 16 additions and 14 deletions

View File

@@ -55,6 +55,21 @@ sub summary {
# ($job->subaction ? (q{'}. $job->subaction .q{'}) : '');
}
=head2 update_status
Passed an L<App::Netdisco::Worker::Status> will update this job's C<log> and
C<status> slots.
=cut
sub update_status {
my $job = shift;
my $status = shift or return;
$job->status( $status->status );
$job->log( $status->log );
return $job;
}
=head1 ADDITIONAL COLUMNS
=head2 extra