JobRunner
MMO\core\jobs · 1 symbole · générée le 27 Oct 2026
JobRunner
JobRunner.php:28Runs one recorded job (JobStore) in the current process, from start to end, and records how it went: its state, its logs as events, its result or its error. It is what a job's own process does (the launcher
- Espace de noms
MMO\core\jobs- Voir
JobStore::spawnwrites callsMain);executealso runs a job in the current process (a test, a command that wants to wait for it).
Index
| finished | ||
| id | ||
| job | ||
| listener | ||
| lock | ||
| store | ||
| Error($e) static | ||
| execute() | Run the job and record its end. | |
| finish($state, $result, $error) | Record the job's end, once, and release what it held. | |
| listen() | Turn the logs dispatched while the job runs into log events (before the application's own logger): the job's own, and the others from aJob::$otherVerbosity up (a library's info, a query, wou… | |
| lock($job) | Hold the exclusive lock of the job's class (aJob::Exclusive): JobStore::create already refuses a second job of an exclusive class, but two could have been created at the same time. | |
| Main($id, $folder) static | A job process's entry point (JobStore::spawn's launcher). | |
| shutdown() | Record a fatal error's end (the job's process dies without reaching the end of execute). | |
| trapSignals($job) | SIGTERM/SIGINT ask the job to stop rather than kill it (once it has noticed, another one kills it). | |
| __construct($store, $id) |
Propriétés6
finished
- Type
- bool
id
- Type
- string
job
listener
lock
store
- Type
- JobStore
Méthodes9
Error($e)
staticJobRunner.php:107execute()
JobRunner.php:63Run the job and record its end.
| retourne | string | its final state: done, stopped or failed |
finish($state, $result, $error)
JobRunner.php:118Record the job's end, once, and release what it held.
listen()
JobRunner.php:161Turn the logs dispatched while the job runs into log events (before the application's own logger): the job's own, and the others from aJob::$otherVerbosity up (a library's info, a query, would drown the job's).
| retourne | void |
lock($job)
JobRunner.php:143Hold the exclusive lock of the job's class (aJob::Exclusive): JobStore::create already refuses a second job of an exclusive class, but two could have been created at the same time.
Main($id, $folder)
staticJobRunner.php:51A job process's entry point (JobStore::spawn's launcher).
shutdown()
JobRunner.php:96Record a fatal error's end (the job's process dies without reaching the end of execute).
| retourne | void |
trapSignals($job)
JobRunner.php:177SIGTERM/SIGINT ask the job to stop rather than kill it (once it has noticed, another one kills it).