X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FBackgroundJobHistory.pm;h=84b2cb7712c49e7431761c4aeb84746c304cb12e;hb=bcdc9f7040d4bc0c0b4d7ce77f1afc29543b04a4;hp=4be8f66c3493789e76c1d3b728401e85beb68656;hpb=5f49de40a2c8c6eca92bb3fd88c1ee0126264bd1;p=kivitendo-erp.git diff --git a/SL/DB/BackgroundJobHistory.pm b/SL/DB/BackgroundJobHistory.pm index 4be8f66c3..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; @@ -8,4 +5,12 @@ use strict; use SL::DB::MetaSetup::BackgroundJobHistory; 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;