Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
86
def
_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
90
def
_refresh_build_ttl(redis, base_key, lock_ttl):
Callers
2
_stream_follow
Function · 0.85
stream_cached_response
Function · 0.85
Calls
2
_lock_key
Function · 0.85
set
Method · 0.45
Tested by
no test coverage detected