Functions called by worker libraries to indicate status, etc
This is the code documentation for the SproutCMS project
Search documentation |
class WorkerFunctions called by worker libraries to indicate status, etc
Extending this class<?php
/**
* New class description goes here
*
* @author Your Name, 2026-09-16
**/
class NewClassName extends Worker {
/**
* Shutdown function, for catching fatal errors
**/
public function shutdown () {
// Method code goes here
}
/**
* Save and output log message for the currently running worker job
**/
public function message (string $message) {
// Method code goes here
}
/**
* Set a metric
**/
public function metric (int $num, int $value) {
// Method code goes here
}
/**
* Report that a worker job failed.
* Terminates the script.
**/
public function failure (string $message) {
// Method code goes here
}
/**
* Report the successful completion of the worker job.
* Terminates the script.
**/
public function success () {
// Method code goes here
}
/**
* Exception and error handling for worker jobs
**/
public function exceptionHandler ($exception, $message, $file, $line) {
// Method code goes here
}
/**
* Called just before the worker thread is started.
**/
public function start ($job_id) {
// Method code goes here
}
}
?>
|
| Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Tuesday, 15th September, 2026 at 10:26 am |
|