class

JoobQ::RedisClient

Inherits Redis < Redis::CommandExecution::ValueOriented < Redis::Commands < Reference < Object

Constructors

new(endpoint : RedisEndpoint, connect_timeout : Time::Span | Nil = 5.seconds, command_timeout : Time::Span | Nil = 5.seconds, ssl_context : OpenSSL::SSL::Context::Client | Nil = endpoint.ssl_context)
Source

Instance methods

command(request : Redis::Request)

Reconnect before a new request, but never replay a request after a lost reply. The dependency's implementation retries all commands once, including RPUSH.

Source
inspect(io : IO) : Nil

The credentials stay out of inspect, pp and exception dumps.

Source
multi

A block can abort with MULTI still buffered, and an EXEC element error can interrupt reply draining after other mutations committed. Never flush or reuse that connection, and never replay a transaction with an unknown outcome.

Source
pipelined

Redis errors can interrupt reply draining midway through a pipeline. Never return that socket to the pool with unread replies for the next borrower. A pipeline is not a transaction: any prefix may already have executed.

Source