Explorar o código

Adjusted Predis\Commands\BackgroundSave according to the new behavior of BGSAVE in Redis 1.2.

Daniele Alessandri %!s(int64=15) %!d(string=hai) anos
pai
achega
91543d776f
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      lib/Predis.php

+ 6 - 0
lib/Predis.php

@@ -1461,6 +1461,12 @@ class Save extends \Predis\InlineCommand {
 class BackgroundSave extends \Predis\InlineCommand {
     public function canBeHashed()  { return false; }
     public function getCommandId() { return 'BGSAVE'; }
+    public function parseResponse($data) {
+        if ($data == 'Background saving started') {
+            return true;
+        }
+        return $data;
+    }
 }
 
 class LastSave extends \Predis\InlineCommand {