From: Nik Everett Date: Mon, 7 Jul 2014 20:17:39 +0000 (-0400) Subject: Work around hhvm bug in redis job queue X-Git-Tag: 1.31.0-rc.0~15067^2 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=95bfc8b956e1fbf0992b717204ecebecbe40fb0e;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 }