MCPcopy Create free account
hub / github.com/Dispatcharr/Dispatcharr / _try_acquire_lock

Function _try_acquire_lock

apps/output/streaming_chunk_cache.py:86–87  ·  view source on GitHub ↗
(redis, base_key, lock_ttl)

Source from the content-addressed store, hash-verified

84
85
86def _try_acquire_lock(redis, base_key, lock_ttl):
87 return bool(redis.set(_lock_key(base_key), "1", nx=True, ex=lock_ttl))
88
89
90def _refresh_build_ttl(redis, base_key, lock_ttl):

Callers 2

_stream_followFunction · 0.85
stream_cached_responseFunction · 0.85

Calls 2

_lock_keyFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected