
##############
BaseTaskWorker
##############


****
NAME
****


Kernel::System::Daemon::DaemonModules::BaseTaskWorker - scheduler task worker base class


***********
DESCRIPTION
***********


Base class for scheduler daemon task worker modules.


****************
PUBLIC INTERFACE
****************


_HandleError()
==============


Creates a system error message and sends an email with the error messages form a task execution.


.. code-block:: perl

     my $Success = $TaskWorkerObject->_HandleError(
         TaskName     => 'some name',
         TaskType      => 'some type',
         LogMessage   => 'some message',       # message to set in the OTRS error log
         ErrorMessage => 'some message',       # message to be sent as a body of the email, usually contains
                                               #     all messages from STDERR including tracebacks
     );



_CheckTaskParams()
==================


Performs basic checks for common task parameters.


.. code-block:: perl

     my $Success = $TaskWorkerObject->_CheckTaskParams(
         TaskID               => 123,
         TaskName             => 'some name',                # optional
         Data                 => $TaskDataHasRef,
         NeededDataAttributes => ['Object', 'Function'],     # optional, list of attributes that task needs in Data hash
         DataParamsRef        => 'HASH',                     # optional, 'HASH' or 'ARRAY', kind of reference of Data->Params
     );





