Kernel::System::AsynchronousExecutor - base class to delegate tasks to the OTRS Scheduler Daemon
ObjectManager controlled modules can add this base class to execute some time consuming tasks in the background using the separate process OTRS Scheduler Daemon.
creates a scheduler daemon task to execute a function asynchronously.
my $Success = $Object->AsyncCall( ObjectName => 'Kernel::System::Ticket', # optional, if not given the object is used from where # this function was called FunctionName => 'MyFunction', # the name of the function to execute FunctionParams => \%MyParams, # a ref with the required parameters for the function Attempts => 3, # optional, default: 1, number of tries to lock the # task by the scheduler MaximumParallelInstances => 1, # optional, default: 0 (unlimited), number of same # function calls from the same object that can be # executed at the the same time );
Returns:
$Success = 1; # of false in case of an error
This software is part of the OTRS project (https://otrs.org/).
This software comes with ABSOLUTELY NO WARRANTY. For details, see the enclosed file COPYING for license information (GPL). If you did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.