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

Function is_task_lock_held

core/utils.py:314–320  ·  view source on GitHub ↗

Return True when another worker holds the task lock (read-only check).

(task_name, id)

Source from the content-addressed store, hash-verified

312
313
314def is_task_lock_held(task_name, id):
315 """Return True when another worker holds the task lock (read-only check)."""
316 redis_client = RedisClient.get_client()
317 if redis_client is None:
318 return False
319 lock_id = f"task_lock_{task_name}_{id}"
320 return bool(redis_client.exists(lock_id))
321
322
323class TaskLockRenewer:

Callers 1

fetch_sd_guide_for_epgFunction · 0.90

Calls 2

get_clientMethod · 0.80
existsMethod · 0.45

Tested by

no test coverage detected