🥅 Better resilience against broken analysis queues

Closes #3726
This commit is contained in:
Gina Häußge committed 2020-09-15 10:20:57 +02:00
1 parent c1fa23d745
commit cdce9a6feb
1 file changed
+9 -2
+9 -2
View File
@@ -1117,11 +1117,18 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
thread = threading.Thread(target=finalize)
thread.daemon = True
thread.start()
self._analysisQueue.resume() # printing done, put those cpu cycles to good use
try:
self._analysisQueue.resume() # printing done, put those cpu cycles to good use
except Exception:
self._logger.exception("Error while resuming the analysis queue")
elif state == comm.MachineCom.STATE_PRINTING:
if settings().get(["gcodeAnalysis", "runAt"]) == "idle":
self._analysisQueue.pause() # only analyse files while idle
try:
self._analysisQueue.pause() # only analyse files while idle
except Exception:
self._logger.exception("Error while pausing the analysis queue")
if state == comm.MachineCom.STATE_CLOSED or state == comm.MachineCom.STATE_CLOSED_WITH_ERROR:
if self._comm is not None: