From 8459bca64a132978dfa273c17e285e63c46fc5e9 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Sun, 28 Feb 2021 09:54:53 +0000 Subject: [PATCH] fix nats ping dict --- api/tacticalrmm/agents/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/tacticalrmm/agents/models.py b/api/tacticalrmm/agents/models.py index a005fdcd..0839c135 100644 --- a/api/tacticalrmm/agents/models.py +++ b/api/tacticalrmm/agents/models.py @@ -295,10 +295,10 @@ class Agent(BaseAuditModel): running_agent = self if run_on_any: - nats_ping = {"func": "ping", "timeout": 1} + nats_ping = {"func": "ping"} # try on self first - r = asyncio.run(self.nats_cmd(nats_ping)) + r = asyncio.run(self.nats_cmd(nats_ping, timeout=1)) if r == "pong": running_agent = self @@ -312,7 +312,7 @@ class Agent(BaseAuditModel): ] for agent in online: - r = asyncio.run(agent.nats_cmd(nats_ping)) + r = asyncio.run(agent.nats_cmd(nats_ping, timeout=1)) if r == "pong": running_agent = agent break