Skip to content

Commit 95e337d

Browse files
Patrick Romowiczdanhunsaker
authored andcommitted
Only ping redis if Worker is unpaused (#47)
Only ping redis if Worker is unpaused
1 parent 5d85ea8 commit 95e337d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Resque/Worker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public function work($interval = Resque::DEFAULT_INTERVAL, $blocking = false)
177177

178178
// is redis still alive?
179179
try {
180-
if (Resque::redis()->ping() === false) {
180+
if (!$this->paused && Resque::redis()->ping() === false) {
181181
throw new CredisException('redis ping() failed');
182182
}
183183
} catch (CredisException $e) {

0 commit comments

Comments
 (0)