|
MediaWiki master
|
Job queue runner utility methods. More...
Public Member Functions | |
| __construct (ServiceOptions $serviceOptions, ILBFactory $lbFactory, JobQueueGroup $jobQueueGroup, ReadOnlyMode $readOnlyMode, LinkCache $linkCache, StatsFactory $statsFactory, 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 |
| MediaWiki\JobQueue\JobRunner::__construct | ( | ServiceOptions | $serviceOptions, |
| ILBFactory | $lbFactory, | ||
| JobQueueGroup | $jobQueueGroup, | ||
| ReadOnlyMode | $readOnlyMode, | ||
| LinkCache | $linkCache, | ||
| StatsFactory | $statsFactory, | ||
| LoggerInterface | $logger ) |
| ServiceOptions | $serviceOptions | |
| ILBFactory | $lbFactory | |
| JobQueueGroup | $jobQueueGroup | The JobQueueGroup for this wiki |
| ReadOnlyMode | $readOnlyMode | |
| LinkCache | $linkCache | |
| StatsFactory | $statsFactory | |
| LoggerInterface | $logger |
Definition at line 100 of file JobRunner.php.
References MediaWiki\Config\ServiceOptions\assertRequiredOptions().
| MediaWiki\JobQueue\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 $wgMaxJobDBWriteDuration.
This should never be called if there are explicit transaction rounds or pending DB writes
| RunnableJob | $job |
Definition at line 311 of file JobRunner.php.
References $job.
Referenced by MediaWiki\JobQueue\JobRunner\run().
| MediaWiki\JobQueue\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 144 of file JobRunner.php.
References $job, MediaWiki\JobQueue\JobRunner\executeJob(), MediaWiki\MainConfigNames\JobClasses, MediaWiki\MainConfigNames\TrxProfilerLimits, MediaWiki\JobQueue\JobQueueGroup\TYPE_DEFAULT, and MediaWiki\JobQueue\JobQueueGroup\USE_CACHE.
| MediaWiki\JobQueue\JobRunner::setDebugHandler | ( | $debug | ) |
| callable | $debug | Optional debug output handler |
Definition at line 86 of file JobRunner.php.
| const MediaWiki\JobQueue\JobRunner::CONSTRUCTOR_OPTIONS |
Definition at line 41 of file JobRunner.php.