Fixed size checking in watchdog growth check

It helps to actually update the last checked file size on each
iteration 🤦‍♀️

Related to #1760
This commit is contained in:
Gina Häußge 2017-02-17 13:05:23 +01:00
parent 7331bc2bf5
commit b7c078f429

View file

@ -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))