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.

Behaviourally equivalent to the adapter a drop-in app expects from sidekiq 8.1.x: same fast-path command list, same deprecation warning, same error constants (gems rescue Sidekiq::RedisClientAdapter::BaseError). The constant names and the deprecated-command set are fixed by that contract; everything below them is Wurk's own.

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