ProcessScheduler
in package
uses
Log
FinalYes
Class to manage and schedule background tasks // {{{
Table of Contents
Methods
- __construct() : mixed
- Creates a new ProcessScheduler
- add() : mixed
- Add a Process to the queue
- isProcessRunning() : bool
- Checks if there are running processes of a certain class
- schedule() : mixed
- Run scheduler
Methods
__construct()
Creates a new ProcessScheduler
public
__construct(mysqli $dbc, Business $business, TaskMapper $mapper) : mixed
Parameters
- $dbc : mysqli
- $business : Business
- $mapper : TaskMapper
add()
Add a Process to the queue
public
add(Process $process) : mixed
Parameters
- $process : Process
isProcessRunning()
Checks if there are running processes of a certain class
public
isProcessRunning(string $classname) : bool
Parameters
- $classname : string
-
a class constant
Return values
boolschedule()
Run scheduler
public
schedule() : mixed