Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 8e115155

Von Moritz Bunkus vor fast 11 Jahren hinzugefügt

  • ID 8e1151555c7383bdd4e9baca68e6fa29b48cbd29
  • Vorgänger f7c4665f
  • Nachfolger 29458987

RDBO BackgroundJob(History): Refactoring von Status-Strings

Unterschiede anzeigen:

SL/DB/BackgroundJob.pm
$history = SL::DB::BackgroundJobHistory
->new(package_name => $self->package_name,
run_at => $run_at,
status => 'success',
status => SL::DB::BackgroundJobHistory::SUCCESS(),
result => $result,
data => $self->data);
$history->save;
......
$history = SL::DB::BackgroundJobHistory
->new(package_name => $self->package_name,
run_at => $run_at,
status => 'failure',
status => SL::DB::BackgroundJobHistory::FAILURE(),
error_col => $error,
data => $self->data);
$history->save;
SL/DB/BackgroundJobHistory.pm
# This file has been auto-generated only because it didn't exist.
# Feel free to modify it at will; it will not be overwritten automatically.
package SL::DB::BackgroundJobHistory;
use strict;
......
__PACKAGE__->meta->initialize;
use constant SUCCESS => 'success';
use constant FAILURE => 'failure';
sub has_succeeded { $_[0] && (($_[0]->status || '') eq SUCCESS()) }
sub has_failed { $_[0] && (($_[0]->status || '') eq FAILURE()) }
1;

Auch abrufbar als: Unified diff