dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Prepare for REL1_33 cut, labelling master as 1.34-alpha"
[lhc/web/wiklou.git]
/
includes
/
jobqueue
/
JobQueueFederated.php
diff --git
a/includes/jobqueue/JobQueueFederated.php
b/includes/jobqueue/JobQueueFederated.php
index
2025bf7
..
8b5a62e
100644
(file)
--- a/
includes/jobqueue/JobQueueFederated.php
+++ b/
includes/jobqueue/JobQueueFederated.php
@@
-199,7
+199,7
@@
class JobQueueFederated extends JobQueue {
* @param HashRing &$partitionRing
* @param int $flags
* @throws JobQueueError
* @param HashRing &$partitionRing
* @param int $flags
* @throws JobQueueError
- * @return
array
List of Job object that could not be inserted
+ * @return
IJobSpecification[]
List of Job object that could not be inserted
*/
protected function tryJobInsertions( array $jobs, HashRing &$partitionRing, $flags ) {
$jobsLeft = [];
*/
protected function tryJobInsertions( array $jobs, HashRing &$partitionRing, $flags ) {
$jobsLeft = [];
@@
-287,7
+287,7
@@
class JobQueueFederated extends JobQueue {
$job = false;
}
if ( $job ) {
$job = false;
}
if ( $job ) {
- $job->
metadata['QueuePartition'] = $partition
;
+ $job->
setMetadata( 'QueuePartition', $partition )
;
return $job;
} else {
return $job;
} else {
@@
-299,15
+299,16
@@
class JobQueueFederated extends JobQueue {
return false;
}
return false;
}
- protected function doAck( Job $job ) {
- if ( !isset( $job->metadata['QueuePartition'] ) ) {
+ protected function doAck( RunnableJob $job ) {
+ $partition = $job->getMetadata( 'QueuePartition' );
+ if ( $partition === null ) {
throw new MWException( "The given job has no defined partition name." );
}
throw new MWException( "The given job has no defined partition name." );
}
- $this->partitionQueues[$
job->metadata['QueuePartition']
]->ack( $job );
+ $this->partitionQueues[$
partition
]->ack( $job );
}
}
- protected function doIsRootJobOldDuplicate(
Job
$job ) {
+ protected function doIsRootJobOldDuplicate(
IJobSpecification
$job ) {
$signature = $job->getRootJobParams()['rootJobSignature'];
$partition = $this->partitionRing->getLiveLocation( $signature );
try {
$signature = $job->getRootJobParams()['rootJobSignature'];
$partition = $this->partitionRing->getLiveLocation( $signature );
try {