From b7c078f429cfef13b1f4a3616ce4617db5852d1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Fri, 17 Feb 2017 13:05:23 +0100 Subject: [PATCH] Fixed size checking in watchdog growth check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It helps to actually update the last checked file size on each iteration 🤦‍♀️ Related to #1760 --- src/octoprint/server/util/watchdog.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/octoprint/server/util/watchdog.py b/src/octoprint/server/util/watchdog.py index 095270a2..85f240cd 100644 --- a/src/octoprint/server/util/watchdog.py +++ b/src/octoprint/server/util/watchdog.py @@ -87,9 +87,10 @@ class GcodeWatchdogHandler(watchdog.events.PatternMatchingEventHandler): if countdown <= 0: break else: - self._logger.debug("File at {} is still growing, waiting...".format(path)) + self._logger.debug("File at {} is still growing (last: {}, new: {}), waiting...".format(path, last_size, new_size)) countdown = stable + last_size = new_size time.sleep(interval) self._logger.debug("File at {} is stable, moving it".format(path))