Browse Source

Add the 'on_retry' callback as an option for Predis\MultiExecBlock.

Daniele Alessandri 14 years ago
parent
commit
8d6f65d3dd
1 changed files with 3 additions and 0 deletions
  1. 3 0
      lib/Predis.php

+ 3 - 0
lib/Predis.php

@@ -990,6 +990,9 @@ class MultiExecBlock {
                     );
                     );
                 }
                 }
                 $this->reset();
                 $this->reset();
+                if (isset($this->_options['on_retry']) && is_callable($this->_options['on_retry'])) {
+                    call_user_func($this->_options['on_retry'], $this, $attemptsLeft);
+                }
                 continue;
                 continue;
             }
             }
             break;
             break;