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

Function increment_stream_count

apps/channels/utils.py:26–32  ·  view source on GitHub ↗
(account)

Source from the content-addressed store, hash-verified

24 return value
25
26def increment_stream_count(account):
27 with lock:
28 current_usage = active_streams_map.get(account.id, 0)
29 current_usage += 1
30 active_streams_map[account.id] = current_usage
31 account.active_streams = current_usage
32 account.save(update_fields=['active_streams'])
33
34def decrement_stream_count(account):
35 with lock:

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
saveMethod · 0.45

Tested by

no test coverage detected