Kombu.Transport.Redis.LuaScripts (Kombu v0.1.0)

Copy Markdown View Source

Lua scripts used by the Redis transport (kombu.transport.redis) for atomic binding deadline tracking and sweeping of expired queue bindings.

Summary

Functions

Computes the binding TTL in milliseconds (max(expires * 2, 3_600_000)).

Executes script via EVALSHA, falling back to EVAL if Redis reports NOSCRIPT.

Computes the lowercase hex SHA1 digest of a Lua script.

Functions

binding_expires_factor()

binding_sweep_interval()

binding_ttl(expires_ms)

@spec binding_ttl(integer()) :: integer()

Computes the binding TTL in milliseconds (max(expires * 2, 3_600_000)).

eval(client, script, keys, args)

@spec eval(Kombu.Transport.Redis.PrefixedClient.t(), String.t(), [String.t()], [
  String.t() | integer()
]) ::
  {:ok, term()} | {:error, term()}

Executes script via EVALSHA, falling back to EVAL if Redis reports NOSCRIPT.

min_binding_ttl()

refresh_binding_script()

sha1(script)

@spec sha1(String.t()) :: String.t()

Computes the lowercase hex SHA1 digest of a Lua script.

sweep_bindings_script()