Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only check out a Redis connection if necessary
In Sidekiq 7, calls to `Sidekiq.redis` checks out a connection from an internal connection pool instead of the connection pool used by the job processors. If that connection is checked out but not used, it's possible that the heartbeat thread won't keep the connection alive before the Redis server client timeout. To avoid this, update the checks to return earlier if the Redis connection is not needed. This might help reduce intermittent `Broken pipe` errors as reported in redis-rb/redis-client#119.
- Loading branch information