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

Function increment_stream_count

apps/m3u/utils.py:39–45  ·  view source on GitHub ↗
(account)

Source from the content-addressed store, hash-verified

37
38
39def increment_stream_count(account):
40 with lock:
41 current_usage = active_streams_map.get(account.id, 0)
42 current_usage += 1
43 active_streams_map[account.id] = current_usage
44 account.active_streams = current_usage
45 account.save(update_fields=['active_streams'])
46
47def decrement_stream_count(account):
48 with lock:

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
saveMethod · 0.45

Tested by

no test coverage detected