MediaWiki REL1_39
|
Job queue runner utility methods. More...
Public Member Functions | |
__construct ( $serviceOptions=null, ILBFactory $lbFactory=null, JobQueueGroup $jobQueueGroup=null, ReadOnlyMode $readOnlyMode=null, LinkCache $linkCache=null, StatsdDataFactoryInterface $statsdDataFactory=null, LoggerInterface $logger=null) | |
Calling this directly is deprecated. | |
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) | |
setLogger (LoggerInterface $logger) | |
Public Attributes | |
const | CONSTRUCTOR_OPTIONS |
JobRunner::__construct | ( | $serviceOptions = null, | |
ILBFactory | $lbFactory = null, | ||
JobQueueGroup | $jobQueueGroup = null, | ||
ReadOnlyMode | $readOnlyMode = null, | ||
LinkCache | $linkCache = null, | ||
StatsdDataFactoryInterface | $statsdDataFactory = null, | ||
LoggerInterface | $logger = null ) |
Calling this directly is deprecated.
Obtain an instance via MediaWikiServices instead.
ServiceOptions | LoggerInterface | null | $serviceOptions | |
ILBFactory | null | $lbFactory | |
JobQueueGroup | null | $jobQueueGroup | The JobQueueGroup for this wiki |
ReadOnlyMode | null | $readOnlyMode | |
LinkCache | null | $linkCache | |
StatsdDataFactoryInterface | null | $statsdDataFactory | |
LoggerInterface | null | $logger |
Definition at line 119 of file JobRunner.php.
References wfDeprecated().
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 338 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 171 of file JobRunner.php.
References $job, $type, and executeJob().
JobRunner::setDebugHandler | ( | $debug | ) |
callable | $debug | Optional debug output handler |
Definition at line 94 of file JobRunner.php.
References $debug.
JobRunner::setLogger | ( | LoggerInterface | $logger | ) |
LoggerInterface | $logger |
Definition at line 103 of file JobRunner.php.
References wfDeprecated().
const JobRunner::CONSTRUCTOR_OPTIONS |
Definition at line 48 of file JobRunner.php.