SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class Worker

Functions called by worker libraries to indicate status, etc

Variables

NameVisibilityDescription
$job_id (static) 
$pdo (static) 
$starttime (static) 
$stmt_message (static) 
$stmt_metric (static) 

Functions

NameVisibilityDescription
exceptionHandlerpublic (static)Exception and error handling for worker jobs
failurepublic (static)Report that a worker job failed.
messagepublic (static)Save and output log message for the currently running worker job
metricpublic (static)Set a metric
shutdownpublic (static)Shutdown function, for catching fatal errors
startpublic (static)Called just before the worker thread is started.
successpublic (static)Report the successful completion of the worker job.

public exceptionHandler

void Worker::exceptionHandler ( mixed $exception [, mixed $message [, mixed $file [, mixed $line ]]] );

Exception and error handling for worker jobs

public failure

void Worker::failure ( [ string $message ] );

Report that a worker job failed.
Terminates the script.

public message

void Worker::message ( string $message );

Save and output log message for the currently running worker job

public metric

void Worker::metric ( int $num , int $value );

Set a metric

public shutdown

void Worker::shutdown ( );

Shutdown function, for catching fatal errors

public start

unknown Worker::start ( mixed $job_id );

Called just before the worker thread is started.

public success

void Worker::success ( );

Report the successful completion of the worker job.
Terminates the script.