- Openclerk\Jobs\JobQueuer
- Core\OpenclerkJobQueuer
class Core \ OpenclerkJobQueuer
A helper class to find job instances that need to be run, and queue them up in the database. Job running is managed by JobRunner. (from JobQueuer)
TODO create more intelligent job queueing strategies (from JobQueuer)
Method Summary
Name | Description |
---|---|
findJobs(Connection $db, Logger $logger) | Get a list of all jobs that need to be queued, as an array of associative arrays with (job_type, arg_id, [user_id]). |
getStandardJobs() |
Get all of the "standard" job types. This provides information such as whether the job type is failable or not. In the future, all of this should be moved into individual job definitions particularly with openclerk/jobs , e.g. FailableJob |
jobQueued(Connection $db, Logger $logger, $job) | The given job has been queued up, so we can mark it as successfully queued. |
Inherited Method Summary
Name | Description |
---|---|
getJobPrefix($job_type) | (from JobQueuer) |
queue(Connection $db, Logger $logger) | Find all jobs that need to be queued through #findJobs() and queue them up in the database. (from JobQueuer) |
public function findJobs(Connection $db, Logger $logger)
Get a list of all jobs that need to be queued, as an array of associative arrays with (job_type, arg_id, [user_id]).
This could use e.g. JobTypeFinder
- Overrides:
- findJobs(Connection $db, Logger $logger)
static function getStandardJobs()
Get all of the "standard" job types. This provides information such as whether the job type is failable or not. In the future, all of this should be moved into individual job definitions particularly with
openclerk/jobs
, e.g. FailableJob
public function jobQueued(Connection $db, Logger $logger, $job)
The given job has been queued up, so we can mark it as successfully queued.