Skip to content

Commit

Permalink
Stop measure. of channel if there is no request
Browse files Browse the repository at this point in the history
See also: #7
  • Loading branch information
BECATRUE committed Nov 21, 2024
1 parent 96b6b4f commit 8898a54
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions wlm_server/operation/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@ def handle_info(request, ch: int):
message = MessageInfo(ActionType.OPERATE, ch, {'on': True})
message_queue.push(message)
operation.save()
else:
operation.save()
is_wlm_running, is_channel_running = get_running_status(ch)
if not is_channel_running:
message = MessageInfo(ActionType.OPERATE, ch, {'on': False})
message_queue.push(message)

0 comments on commit 8898a54

Please sign in to comment.