MediaWiki REL1_30
|
A wrapper for the JobQueue that delegates all the method calls to a single, main queue, and also pushes all the jobs to a second job queue that's being debugged. More...
Public Member Functions | |
getAllAbandonedJobs () | |
Get an iterator to traverse over all abandoned jobs in this queue. | |
getAllAcquiredJobs () | |
Get an iterator to traverse over all claimed jobs in this queue. | |
getAllDelayedJobs () | |
Get an iterator to traverse over all delayed jobs in this queue. | |
getAllQueuedJobs () | |
Get an iterator to traverse over all available jobs in this queue. | |
getCoalesceLocationInternal () | |
Do not use this function outside of JobQueue/JobQueueGroup. | |
Public Member Functions inherited from JobQueue | |
ack (Job $job) | |
Acknowledge that a job was completed. | |
batchPush (array $jobs, $flags=0) | |
Push a batch of jobs into the queue. | |
deduplicateRootJob (IJobSpecification $job) | |
Register the "root job" of a given job into the queue for de-duplication. | |
delayedJobsEnabled () | |
delete () | |
Deleted all unclaimed and delayed jobs from the queue. | |
flushCaches () | |
Clear any process and persistent caches. | |
getAbandonedCount () | |
Get the number of acquired jobs that can no longer be attempted. | |
getAcquiredCount () | |
Get the number of acquired jobs (these are temporarily out of the queue). | |
getDelayedCount () | |
Get the number of delayed jobs (these are temporarily out of the queue). | |
getOrder () | |
getReadOnlyReason () | |
getSiblingQueueSizes (array $types) | |
Check the size of each of the given queues. | |
getSiblingQueuesWithJobs (array $types) | |
Check whether each of the given queues are empty. | |
getSize () | |
Get the number of available (unacquired, non-delayed) jobs in the queue. | |
getType () | |
getWiki () | |
isEmpty () | |
Quickly check if the queue has no available (unacquired, non-delayed) jobs. | |
pop () | |
Pop a job off of the queue. | |
push ( $jobs, $flags=0) | |
Push one or more jobs into the queue. | |
waitForBackups () | |
Wait for any replica DBs or backup servers to catch up. | |
Protected Member Functions | |
__construct (array $params) | |
assertNotReadOnly () | |
doAck (Job $job) | |
doBatchPush (array $jobs, $flags) | |
doDeduplicateRootJob (IJobSpecification $job) | |
doDelete () | |
doFlushCaches () | |
doGetAbandonedCount () | |
doGetAcquiredCount () | |
doGetDelayedCount () | |
doGetSiblingQueueSizes (array $types) | |
doGetSiblingQueuesWithJobs (array $types) | |
doGetSize () | |
doIsEmpty () | |
doIsRootJobOldDuplicate (Job $job) | |
doPop () | |
doWaitForBackups () | |
getRootJobCacheKey ( $signature) | |
optimalOrder () | |
Get the default queue order to use if configuration does not specify one. | |
supportedOrders () | |
Get the allowed queue orders for configuration validation. | |
supportsDelayedJobs () | |
Find out if delayed jobs are supported for configuration validation. | |
Protected Member Functions inherited from JobQueue | |
isRootJobOldDuplicate (Job $job) | |
Check if the "root" job of a given job has been superseded by a newer one. | |
Private Attributes | |
JobQueue | $debugQueue |
JobQueue | $mainQueue |
Additional Inherited Members | |
Static Public Member Functions inherited from JobQueue | |
static | factory (array $params) |
Get a job queue object of the specified type. | |
static | incrStats ( $key, $type, $delta=1) |
Call wfIncrStats() for the queue overall and for the queue type. | |
Public Attributes inherited from JobQueue | |
const | QOS_ATOMIC = 1 |
const | ROOTJOB_TTL = 2419200 |
Protected Attributes inherited from JobQueue | |
JobQueueAggregator | $aggr |
int | $claimTTL |
Time to live in seconds. | |
BagOStuff | $dupCache |
int | $maxTries |
Maximum number of times to try a job. | |
string | $order |
Job priority for pop() | |
string bool | $readOnlyReason |
Read only rationale (or false if r/w) | |
string | $type |
Job type. | |
string | $wiki |
Wiki ID. | |
A wrapper for the JobQueue that delegates all the method calls to a single, main queue, and also pushes all the jobs to a second job queue that's being debugged.
This class was temporary added to test transitioning to the JobQueueEventBus and will removed after the transition is completed. This code is only needed while we are testing the new infrastructure to be able to compare the results between the queue implementations and make sure that they process the same jobs, deduplicate correctly, compare the delays, backlogs and make sure no jobs are lost. When the new infrastructure is well tested this will not be needed any more.
Definition at line 18 of file JobQueueSecondTestQueue.php.
|
protected |
array | $params |
MWException |
Reimplemented from JobQueue.
Definition at line 30 of file JobQueueSecondTestQueue.php.
References $params, and JobQueue\factory().
|
protected |
JobQueueReadOnlyError |
Reimplemented from JobQueue.
Definition at line 279 of file JobQueueSecondTestQueue.php.
|
protected |
Job | $job |
Reimplemented from JobQueue.
Definition at line 143 of file JobQueueSecondTestQueue.php.
References $job.
|
protected |
IJobSpecification[] | $jobs | |
int | $flags |
Reimplemented from JobQueue.
Definition at line 120 of file JobQueueSecondTestQueue.php.
References $flags.
|
protected |
IJobSpecification | $job |
MWException |
Reimplemented from JobQueue.
Definition at line 153 of file JobQueueSecondTestQueue.php.
References $job.
|
protected |
MWException |
Reimplemented from JobQueue.
Definition at line 179 of file JobQueueSecondTestQueue.php.
|
protected |
Reimplemented from JobQueue.
Definition at line 195 of file JobQueueSecondTestQueue.php.
|
protected |
Reimplemented from JobQueue.
Definition at line 111 of file JobQueueSecondTestQueue.php.
|
protected |
Reimplemented from JobQueue.
Definition at line 95 of file JobQueueSecondTestQueue.php.
|
protected |
Reimplemented from JobQueue.
Definition at line 103 of file JobQueueSecondTestQueue.php.
|
protected |
array | $types | List of queues types |
Reimplemented from JobQueue.
Definition at line 272 of file JobQueueSecondTestQueue.php.
|
protected |
array | $types | List of queues types |
Reimplemented from JobQueue.
Definition at line 263 of file JobQueueSecondTestQueue.php.
|
protected |
Reimplemented from JobQueue.
Definition at line 87 of file JobQueueSecondTestQueue.php.
|
protected |
Reimplemented from JobQueue.
Definition at line 79 of file JobQueueSecondTestQueue.php.
|
protected |
Job | $job |
Reimplemented from JobQueue.
Definition at line 162 of file JobQueueSecondTestQueue.php.
References $job.
|
protected |
Reimplemented from JobQueue.
Definition at line 134 of file JobQueueSecondTestQueue.php.
|
protected |
Reimplemented from JobQueue.
Definition at line 187 of file JobQueueSecondTestQueue.php.
JobQueueSecondTestQueue::getAllAbandonedJobs | ( | ) |
Get an iterator to traverse over all abandoned jobs in this queue.
JobQueueError |
Reimplemented from JobQueue.
Definition at line 244 of file JobQueueSecondTestQueue.php.
JobQueueSecondTestQueue::getAllAcquiredJobs | ( | ) |
Get an iterator to traverse over all claimed jobs in this queue.
Callers should be quick to iterator over it or few results will be returned due to jobs being acknowledged and deleted
JobQueueError |
Reimplemented from JobQueue.
Definition at line 233 of file JobQueueSecondTestQueue.php.
JobQueueSecondTestQueue::getAllDelayedJobs | ( | ) |
Get an iterator to traverse over all delayed jobs in this queue.
Note: results may be stale if the queue is concurrently modified.
JobQueueError |
Reimplemented from JobQueue.
Definition at line 219 of file JobQueueSecondTestQueue.php.
JobQueueSecondTestQueue::getAllQueuedJobs | ( | ) |
Get an iterator to traverse over all available jobs in this queue.
This does not include jobs that are currently acquired or delayed. Note: results may be stale if the queue is concurrently modified.
JobQueueError |
Reimplemented from JobQueue.
Definition at line 207 of file JobQueueSecondTestQueue.php.
JobQueueSecondTestQueue::getCoalesceLocationInternal | ( | ) |
Do not use this function outside of JobQueue/JobQueueGroup.
Reimplemented from JobQueue.
Definition at line 254 of file JobQueueSecondTestQueue.php.
|
protected |
string | $signature | Hash identifier of the root job |
Reimplemented from JobQueue.
Definition at line 170 of file JobQueueSecondTestQueue.php.
|
protected |
Get the default queue order to use if configuration does not specify one.
Reimplemented from JobQueue.
Definition at line 62 of file JobQueueSecondTestQueue.php.
|
protected |
Get the allowed queue orders for configuration validation.
Reimplemented from JobQueue.
Definition at line 53 of file JobQueueSecondTestQueue.php.
|
protected |
Find out if delayed jobs are supported for configuration validation.
Reimplemented from JobQueue.
Definition at line 71 of file JobQueueSecondTestQueue.php.
|
private |
Definition at line 28 of file JobQueueSecondTestQueue.php.
|
private |
Definition at line 23 of file JobQueueSecondTestQueue.php.