Skip to content

Commit

Permalink
call ping to set connection for avoiding error
Browse files Browse the repository at this point in the history
when subscribed_to is empty , call ping to set connection attr for avoiding redis parse_response error
  • Loading branch information
uuip authored and auvipy committed Jan 12, 2022
1 parent 9377e94 commit bc13e2f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions celery/backends/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ def _reconnect_pubsub(self):
)
if self.subscribed_to:
self._pubsub.subscribe(*self.subscribed_to)
else:
self._pubsub.ping()

@contextmanager
def reconnect_on_error(self):
Expand Down

0 comments on commit bc13e2f

Please sign in to comment.