X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FBackgroundJob%2FBase.pm;h=912fdc6fd85c63e0390e3a56d53f3b47e215ae69;hb=12b9a472b5cdb98b1f30ef3df52d9067c2f38cfe;hp=27f608129bf062a91fcac858e6ac77743243416e;hpb=f9c7abfae65b79945beb7e9260942bc94876248a;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;