31 if ( !isset(
$params[
'mainqueue'] ) ) {
32 throw new MWException(
"mainqueue parameter must be provided to the debug queue" );
35 if ( !isset(
$params[
'debugqueue'] ) ) {
36 throw new MWException(
"debugqueue parameter must be provided to the debug queue" );
54 return $this->mainQueue->supportedOrders();
63 return $this->mainQueue->optimalOrder();
72 return $this->mainQueue->supportsDelayedJobs();
80 return $this->mainQueue->doIsEmpty();
88 return $this->mainQueue->doGetSize();
96 return $this->mainQueue->doGetAcquiredCount();
104 return $this->mainQueue->doGetDelayedCount();
112 return $this->mainQueue->doGetAbandonedCount();
121 $this->mainQueue->doBatchPush( $jobs,
$flags );
124 $this->debugQueue->doBatchPush( $jobs,
$flags );
125 }
catch ( Exception $exception ) {
126 MWExceptionHandler::logException( $exception );
135 return $this->mainQueue->doPop();
144 return $this->mainQueue->doAck(
$job );
154 return $this->mainQueue->doDeduplicateRootJob(
$job );
163 return $this->mainQueue->doIsRootJobOldDuplicate(
$job );
171 return $this->mainQueue->getRootJobCacheKey( $signature );
180 return $this->mainQueue->doDelete();
188 $this->mainQueue->doWaitForBackups();
196 $this->mainQueue->doFlushCaches();
208 return $this->mainQueue->getAllQueuedJobs();
220 return $this->mainQueue->getAllDelayedJobs();
234 return $this->mainQueue->getAllAcquiredJobs();
245 return $this->mainQueue->getAllAbandonedJobs();
255 return $this->mainQueue->getCoalesceLocationInternal();
264 return $this->mainQueue->doGetSiblingQueuesWithJobs( $types );
273 return $this->mainQueue->doGetSiblingQueueSizes( $types );
280 $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.
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.
the array() calling protocol came about after MediaWiki 1.4rc1.
it s the revision text itself In either if gzip is the revision text is gzipped $flags
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Job queue task description interface.
if(count( $args)< 1) $job