- Openclerk\Jobs\JobRunner
- Core\OpenclerkJobRunner
class Core \ OpenclerkJobRunner
- All known direct subclasses:
- OpenclerkJobRunnerPremium,OpenclerkJobRunnerSystem,OpenclerkJobRunnerType
A helper class to select job instances, run them, and manage their pass/fail statuses. Job queueing is managed by JobQueuer. (from JobRunner)
TODO create more intelligent job selection methods (from JobRunner)
Method Summary
Name | Description |
---|---|
createJob($job, Connection $db, Logger $logger) | Just creates GenericOpenclerkJobs for now |
findJob(Connection $db, Logger $logger) | If we have a ?job_id parameter, then select only this job |
isJobsDisabled(Logger $logger) |
Inherited Method Summary
Name | Description |
---|---|
__construct() | (from JobRunner) |
defaultFindJobQuery() | (from JobRunner) |
runOne(Connection $db, Logger $logger) | Select and run a Job. If the job throws an exception, the job runner will capture this exception and mark the job as failed as necessary. (from JobRunner) |
public function createJob($job, Connection $db, Logger $logger)
Just creates GenericOpenclerkJobs for now
public function findJob(Connection $db, Logger $logger)
If we have a ?job_id parameter, then select only this job
- Overrides:
- findJob(Connection $db, Logger $logger)
- Returns:
a job array (id, job_type, [user_id], [arg_id]) orfalse
if there is none