jenkins-bot has submitted this change and it was merged.
Change subject: [JobQueue] Simplified a bit of code in JobQueueRedis.
......................................................................
[JobQueue] Simplified a bit of code in JobQueueRedis.
Change-Id: Ia0329a9721b126a3573cfee0d67c9a54c911196f
---
M includes/job/JobQueueRedis.php
1 file changed, 2 insertions(+), 11 deletions(-)
Approvals:
Tim Starling: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/job/JobQueueRedis.php b/includes/job/JobQueueRedis.php
index 6947f73..d30e20e 100644
--- a/includes/job/JobQueueRedis.php
+++ b/includes/job/JobQueueRedis.php
@@ -467,13 +467,10 @@
* @return bool
*/
protected function doIsRootJobOldDuplicate( Job $job ) {
- $params = $job->getParams();
- if ( !isset( $params['rootJobSignature'] ) ) {
+ if ( !$job->hasRootJobParams() ) {
return false; // job has no de-deplication info
- } elseif ( !isset( $params['rootJobTimestamp'] ) ) {
- wfDebugLog( 'JobQueueRedis', "Cannot check root job;
missing 'rootJobTimestamp'." );
- return false;
}
+ $params = $job->getRootJobParams();
$conn = $this->getConnection();
try {
@@ -493,9 +490,6 @@
*/
public function getAllQueuedJobs() {
$conn = $this->getConnection();
- if ( !$conn ) {
- throw new MWException( "Unable to connect to redis
server." );
- }
try {
$that = $this;
return new MappedIterator(
@@ -515,9 +509,6 @@
*/
public function getAllDelayedJobs() {
$conn = $this->getConnection();
- if ( !$conn ) {
- throw new MWException( "Unable to connect to redis
server." );
- }
try {
$that = $this;
return new MappedIterator( // delayed jobs
--
To view, visit https://gerrit.wikimedia.org/r/57469
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia0329a9721b126a3573cfee0d67c9a54c911196f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: Tim Starling <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits