X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/3ceb381944924a7b6a14d69361754422b8b49589..ada964d139eb652502bbdec96adf8634e49d8872:/SL/BackgroundJob/Base.pm 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;