X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/0b2ca0abb53db0d372bcc51e8093abb30f2aeea6..7cd6d451d97d1f1e7f3c0f9db2de03735dc8c8f0:/SL/DB/BackgroundJobHistory.pm diff --git a/SL/DB/BackgroundJobHistory.pm b/SL/DB/BackgroundJobHistory.pm index f8e08f8d9..84b2cb771 100644 --- a/SL/DB/BackgroundJobHistory.pm +++ b/SL/DB/BackgroundJobHistory.pm @@ -1,13 +1,16 @@ -# 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; use SL::DB::MetaSetup::BackgroundJobHistory; +use SL::DB::Manager::BackgroundJobHistory; + +__PACKAGE__->meta->initialize; + +use constant SUCCESS => 'success'; +use constant FAILURE => 'failure'; -# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. -__PACKAGE__->meta->make_manager_class; +sub has_succeeded { $_[0] && (($_[0]->status || '') eq SUCCESS()) } +sub has_failed { $_[0] && (($_[0]->status || '') eq FAILURE()) } 1;