SWU: remove one thread level

on_after_startup now runs in its own thread, no need to spawn yet
another.
This commit is contained in:
Gina Häußge committed 2018-11-20 12:42:43 +01:00
1 parent 900f03dc8a
commit b8d4a58207
1 file changed
+2 -9
@@ -99,15 +99,8 @@ class SoftwareUpdatePlugin(octoprint.plugin.BlueprintPlugin,
self._console_logger.propagate = False
def on_after_startup(self):
# refresh cache now if necessary so it's faster once the user connects to the instance - but decouple it from
# the server startup
def fetch_data():
self.get_current_versions()
self._check_environment()
thread = threading.Thread(target=fetch_data)
thread.daemon = True
thread.start()
self._check_environment()
self.get_current_versions()
def _get_configured_checks(self):
with self._configured_checks_mutex: