Browse Source

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

Daniele Alessandri 15 years ago
parent
commit
91543d776f
1 changed files with 6 additions and 0 deletions
  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 {