Kernel::System::Daemon::DaemonModules::BaseTaskWorker

NAME

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

DESCRIPTION

Base class for scheduler daemon task worker modules.

METHODS

new()

Constructor for Daemon Task Worker objects.

ModuleName()

Derives the Module Name in comparison with the Base Module Name

InitPrinter()

Configuring the STDOUT and STDERR printing

HandleError()

Exportable wrapper function for _HandleError which can be called statically.

See also: Method _HandleError()

    my $Success = 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
    );

Print()

This method will print the given text to STDOUT.

PrintError()

This method will print the given text to STDERR.

You can add color tags (<green>...</green>, <yellow>...</yellow>, <red>...</red>) to your text, and they will be replaced with the corresponding terminal escape sequences if the terminal supports it.

Scroll to Top