X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FBackgroundJob%2FBase.pm;h=912fdc6fd85c63e0390e3a56d53f3b47e215ae69;hb=ee03d15d22eebae4c5224bd68a23b6b4d8a466c0;hp=27f608129bf062a91fcac858e6ac77743243416e;hpb=0b2ca0abb53db0d372bcc51e8093abb30f2aeea6;p=kivitendo-erp.git diff --git a/SL/BackgroundJob/Base.pm b/SL/BackgroundJob/Base.pm index 27f608129..912fdc6fd 100644 --- a/SL/BackgroundJob/Base.pm +++ b/SL/BackgroundJob/Base.pm @@ -4,7 +4,14 @@ use strict; use parent qw(Rose::Object); +use IO::Dir; use SL::DB::BackgroundJob; +use SL::System::Process; + +sub get_known_job_classes { + tie my %dir_h, 'IO::Dir', File::Spec->catdir(File::Spec->splitdir(SL::System::Process->exe_dir), 'SL', 'BackgroundJob'); + return sort map { s/\.pm$//; $_ } grep { m/\.pm$/ && !m/(?: ALL | Base) \.pm$/x } keys %dir_h; +} sub create_standard_job { my $self_or_class = shift;