We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70c3cf1 commit 5285c91Copy full SHA for 5285c91
faraday/server/websockets/dispatcher.py
@@ -8,6 +8,7 @@
8
9
# Related third party imports
10
import itsdangerous
11
+import sqlalchemy
12
from flask import current_app, request
13
14
from faraday.server.api.modules.websocket_auth import decode_agent_websocket_token
@@ -48,7 +49,11 @@ def update_executors(agent, executors):
48
49
50
51
def remove_sid():
- agents = Agent.query.filter(Agent.sid!=None).all() # noqa E711
52
+ try:
53
+ agents = Agent.query.filter(Agent.sid!=None).all() # noqa E711
54
+ except sqlalchemy.exc.OperationalError as error:
55
+ logger.warning("Could not update agents table. %s", error)
56
+ return
57
logger.debug(f"Found {len(agents)} agents connected")
58
for agent in agents:
59
agent.sid = None
0 commit comments