Possible relay fix :)

This commit is contained in:
ebolam
2022-09-16 20:02:15 -04:00
parent e89c59fe92
commit a330d2069f
2 changed files with 16 additions and 13 deletions

View File

@@ -34,6 +34,7 @@ def process_variable_changes(socketio, classname, name, value, old_value, debug_
else:
#If we got a variable change from a thread other than what the app is run it, eventlet seems to block and no further messages are sent. Instead, we'll rely the message to the app and have the main thread send it
if not has_request_context():
print("Had to use relay :(")
data = ["var_changed", {"classname": classname, "name": name, "old_value": clean_var_for_emit(old_value), "value": clean_var_for_emit(value)}, {"include_self":True, "broadcast":True, "room":"UI_2"}]
if queue is not None:
queue.put(data)