add request ID to the args list
This commit is contained in:
@@ -156,6 +156,11 @@ async def receive_commands(websocket):
|
|||||||
command_name = data.get("name")
|
command_name = data.get("name")
|
||||||
args = data.get("args", [])
|
args = data.get("args", [])
|
||||||
|
|
||||||
|
# Check if there is a req ID, if so add it to the args
|
||||||
|
req_id = data.get("request_id", None)
|
||||||
|
if req_id:
|
||||||
|
args.append(req_id)
|
||||||
|
|
||||||
if command_name in command_handlers:
|
if command_name in command_handlers:
|
||||||
print(f"Executing command: {command_name} with args {args}")
|
print(f"Executing command: {command_name} with args {args}")
|
||||||
# Execute the registered async function
|
# Execute the registered async function
|
||||||
|
|||||||
Reference in New Issue
Block a user