Class: Wurk::RedisClientAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/wurk/redis_client_adapter.rb

Overview

Command-method compatibility for connections yielded by ‘Wurk.redis` / `Sidekiq.redis` (#204). Sidekiq 7+ yields RedisClientAdapter::CompatClient, so third-party gems write `conn.hgetall(…)` / `conn.smembers(…)` —method-style commands raw RedisClient doesn’t answer (it only has #call). Every pooled connection is wrapped in this decorator at build time (RedisPool#build_client); wurk’s own hot paths keep using #call, which the decorator forwards with a single delegation hop.

Mirrors sidekiq-8.1.6 lib/sidekiq/redis_client_adapter.rb byte-for-byte in behavior: same fast-path command list, same deprecation warning, same error constants (gems rescue ‘Sidekiq::RedisClientAdapter::BaseError`).

Defined Under Namespace

Modules: CompatMethods Classes: CompatClient

Constant Summary collapse

BaseError =
RedisClient::Error
CommandError =
RedisClient::CommandError
DEPRECATED_COMMANDS =
%i[rpoplpush zrangebyscore zrevrange zrevrangebyscore getset hmset setex setnx].to_set