(account)
| 32 | account.save(update_fields=['active_streams']) |
| 33 | |
| 34 | def decrement_stream_count(account): |
| 35 | with lock: |
| 36 | current_usage = active_streams_map.get(account.id, 0) |
| 37 | if current_usage > 0: |
| 38 | current_usage -= 1 |
| 39 | if current_usage == 0: |
| 40 | del active_streams_map[account.id] |
| 41 | else: |
| 42 | active_streams_map[account.id] = current_usage |
| 43 | account.active_streams = current_usage |
| 44 | account.save(update_fields=['active_streams']) |
| 45 | |
| 46 | |
| 47 | def auto_apply_epg_logos_enabled(custom_properties): |