X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FBackgroundJobHistory.pm;h=84b2cb7712c49e7431761c4aeb84746c304cb12e;hb=83a78eea7bb24102f0b255bd350b7dd343e7a8e4;hp=1455480399ae79cb9c5a58476cf7e1cd1eaf85b3;hpb=2d7e4203055156dccb2ca3fba82bbb32873ecd2e;p=kivitendo-erp.git diff --git a/SL/DB/BackgroundJobHistory.pm b/SL/DB/BackgroundJobHistory.pm index 145548039..84b2cb771 100644 --- a/SL/DB/BackgroundJobHistory.pm +++ b/SL/DB/BackgroundJobHistory.pm @@ -1,6 +1,3 @@ -# 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; @@ -10,4 +7,10 @@ use SL::DB::Manager::BackgroundJobHistory; __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;