Awight has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/230948

Change subject: Don't fetch data if we're just testing for existence
......................................................................

Don't fetch data if we're just testing for existence

Bug: T107852
Change-Id: Ib731a0f1c0c5eadf9ddf62c3db27d9dcb5561f6a
---
M src/PHPQueue/Backend/Predis.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/php-queue 
refs/changes/48/230948/1

diff --git a/src/PHPQueue/Backend/Predis.php b/src/PHPQueue/Backend/Predis.php
index 9382caf..721d91c 100644
--- a/src/PHPQueue/Backend/Predis.php
+++ b/src/PHPQueue/Backend/Predis.php
@@ -135,9 +135,9 @@
             if ($values) {
                 // Use that value as a key into the key-value block.
                 $key = $values[0];
-                $data = $tx->get($key);
+                $exists = $tx->exists($key);
 
-                if ($data === null) {
+                if (!$exists) {
                     // If the data is missing, then remove from the FIFO index.
                     $tx->zrem(Predis::FIFO_INDEX, $key);
                 } else {

-- 
To view, visit https://gerrit.wikimedia.org/r/230948
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib731a0f1c0c5eadf9ddf62c3db27d9dcb5561f6a
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/php-queue
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to