From 95bfc8b956e1fbf0992b717204ecebecbe40fb0e Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Mon, 7 Jul 2014 16:17:39 -0400 Subject: [PATCH] Work around hhvm bug in redis job queue The hhvm redis client returns false instead of null. This caused JobQueueRedis to get stuck in an infinite loop. This works around the difference by catching null as a signal for no more jobs. It can be reverted when https://github.com/facebook/hhvm/pull/3127/ is in all versions of hhvm we expect to run MediaWiki. Bug: 67622 Change-Id: I9bbad42f36a80635097b8e0140b48b6492b2f0f5 --- includes/jobqueue/JobQueueRedis.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/jobqueue/JobQueueRedis.php b/includes/jobqueue/JobQueueRedis.php index 39fccdd990..088f447cd7 100644 --- a/includes/jobqueue/JobQueueRedis.php +++ b/includes/jobqueue/JobQueueRedis.php @@ -313,7 +313,7 @@ LUA; } else { $blob = $this->popAndDeleteBlob( $conn ); } - if ( $blob === false ) { + if ( !is_string( $blob ) ) { break; // no jobs; nothing to do } -- 2.20.1