MediaWiki REL1_40
|
Job queue runner utility methods. More...
Public Member Functions | |
__construct (ServiceOptions $serviceOptions, ILBFactory $lbFactory, JobQueueGroup $jobQueueGroup, ReadOnlyMode $readOnlyMode, LinkCache $linkCache, StatsdDataFactoryInterface $statsdDataFactory, LoggerInterface $logger) | |
executeJob (RunnableJob $job) | |
Run a specific job in a manner appropriate for mass use by job dispatchers. | |
run (array $options) | |
Run jobs of the specified number/type for the specified time. | |
setDebugHandler ( $debug) | |
Public Attributes | |
const | CONSTRUCTOR_OPTIONS |
JobRunner::__construct | ( | ServiceOptions | $serviceOptions, |
ILBFactory | $lbFactory, | ||
JobQueueGroup | $jobQueueGroup, | ||
ReadOnlyMode | $readOnlyMode, | ||
LinkCache | $linkCache, | ||
StatsdDataFactoryInterface | $statsdDataFactory, | ||
LoggerInterface | $logger ) |
ServiceOptions | $serviceOptions | |
ILBFactory | $lbFactory | |
JobQueueGroup | $jobQueueGroup | The JobQueueGroup for this wiki |
ReadOnlyMode | $readOnlyMode | |
LinkCache | $linkCache | |
StatsdDataFactoryInterface | $statsdDataFactory | |
LoggerInterface | $logger |
Definition at line 105 of file JobRunner.php.
References MediaWiki\Config\ServiceOptions\assertRequiredOptions().
JobRunner::executeJob | ( | RunnableJob | $job | ) |
Run a specific job in a manner appropriate for mass use by job dispatchers.
Wraps the job's run() and tearDown() methods into appropriate transaction rounds. During execution, SPI-based logging will use the ID of the HTTP request that spawned the job (instead of the current one). Large DB write transactions will be subject to $wgJobSerialCommitThreshold and $wgMaxJobDBWriteDuration.
This should never be called if there are explicit transaction rounds or pending DB writes
RunnableJob | $job |
Definition at line 316 of file JobRunner.php.
References $job.
Referenced by run().
JobRunner::run | ( | array | $options | ) |
Run jobs of the specified number/type for the specified time.
The response map has a 'job' field that lists status of each job, including:
This method outputs status information only if a debug handler was set. Any exceptions are caught and logged, but are not reported as output.
array | $options | Map of parameters:
|
JobQueueError |
Definition at line 149 of file JobRunner.php.
References $job, $type, and executeJob().
JobRunner::setDebugHandler | ( | $debug | ) |
callable | $debug | Optional debug output handler |
Definition at line 91 of file JobRunner.php.
const JobRunner::CONSTRUCTOR_OPTIONS |
Definition at line 45 of file JobRunner.php.