浏览代码

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

Daniele Alessandri 15 年之前
父节点
当前提交
91543d776f
共有 1 个文件被更改,包括 6 次插入0 次删除
  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 {
 class BackgroundSave extends \Predis\InlineCommand {
     public function canBeHashed()  { return false; }
     public function canBeHashed()  { return false; }
     public function getCommandId() { return 'BGSAVE'; }
     public function getCommandId() { return 'BGSAVE'; }
+    public function parseResponse($data) {
+        if ($data == 'Background saving started') {
+            return true;
+        }
+        return $data;
+    }
 }
 }
 
 
 class LastSave extends \Predis\InlineCommand {
 class LastSave extends \Predis\InlineCommand {