36 if ( !isset(
$params[
'mainqueue'] ) ) {
37 throw new MWException(
"mainqueue parameter must be provided to the debug queue" );
40 if ( !isset(
$params[
'debugqueue'] ) ) {
41 throw new MWException(
"debugqueue parameter must be provided to the debug queue" );
47 $this->onlyWriteToDebugQueue = isset(
$params[
'readonly'] ) ?
$params[
'readonly'] :
false;
60 return $this->mainQueue->supportedOrders();
69 return $this->mainQueue->optimalOrder();
78 return $this->mainQueue->supportsDelayedJobs();
86 return $this->mainQueue->doIsEmpty();
94 return $this->mainQueue->doGetSize();
102 return $this->mainQueue->doGetAcquiredCount();
110 return $this->mainQueue->doGetDelayedCount();
118 return $this->mainQueue->doGetAbandonedCount();
127 if ( !$this->onlyWriteToDebugQueue ) {
128 $this->mainQueue->doBatchPush( $jobs, $flags );
132 $this->debugQueue->doBatchPush( $jobs, $flags );
133 }
catch ( Exception $exception ) {
134 MWExceptionHandler::logException( $exception );
143 return $this->mainQueue->doPop();
152 return $this->mainQueue->doAck(
$job );
162 return $this->mainQueue->doDeduplicateRootJob(
$job );
171 return $this->mainQueue->doIsRootJobOldDuplicate(
$job );
179 return $this->mainQueue->getRootJobCacheKey( $signature );
188 return $this->mainQueue->doDelete();
196 $this->mainQueue->doWaitForBackups();
204 $this->mainQueue->doFlushCaches();
216 return $this->mainQueue->getAllQueuedJobs();
228 return $this->mainQueue->getAllDelayedJobs();
242 return $this->mainQueue->getAllAcquiredJobs();
253 return $this->mainQueue->getAllAbandonedJobs();
263 return $this->mainQueue->getCoalesceLocationInternal();
272 return $this->mainQueue->doGetSiblingQueuesWithJobs( $types );
281 return $this->mainQueue->doGetSiblingQueueSizes( $types );
288 $this->mainQueue->assertNotReadOnly();
A wrapper for the JobQueue that delegates all the method calls to a single, main queue,...
getAllAcquiredJobs()
Get an iterator to traverse over all claimed jobs in this queue.
bool $onlyWriteToDebugQueue
doGetSiblingQueuesWithJobs(array $types)
doDeduplicateRootJob(IJobSpecification $job)
doIsRootJobOldDuplicate(Job $job)
getAllDelayedJobs()
Get an iterator to traverse over all delayed jobs in this queue.
supportsDelayedJobs()
Find out if delayed jobs are supported for configuration validation.
getRootJobCacheKey( $signature)
getAllQueuedJobs()
Get an iterator to traverse over all available jobs in this queue.
getAllAbandonedJobs()
Get an iterator to traverse over all abandoned jobs in this queue.
doGetSiblingQueueSizes(array $types)
__construct(array $params)
getCoalesceLocationInternal()
Do not use this function outside of JobQueue/JobQueueGroup.
supportedOrders()
Get the allowed queue orders for configuration validation.
doBatchPush(array $jobs, $flags)
optimalOrder()
Get the default queue order to use if configuration does not specify one.
Class to handle enqueueing and running of background jobs.
static factory(array $params)
Get a job queue object of the specified type.
Class to both describe a background job and handle jobs.
Job queue task description interface.
if(count( $args)< 1) $job