Add Shutdown Event
This commit is contained in:
1 parent
86b96b8d4a
commit
e1d58660d7
2 files changed
+2
No files matched your search
@@ -26,6 +26,7 @@ def all_events():
|
||||
class Events(object):
|
||||
# application startup
|
||||
STARTUP = "Startup"
|
||||
SHUTDOWN = "Shutdown"
|
||||
|
||||
# connect/disconnect to printer
|
||||
CONNECTING = "Connecting"
|
||||
|
||||
@@ -511,6 +511,7 @@ class Server():
|
||||
self._logger.info("Shutting down...")
|
||||
observer.stop()
|
||||
observer.join()
|
||||
eventManager.fire(events.Events.SHUTDOWN)
|
||||
octoprint.plugin.call_plugin(octoprint.plugin.ShutdownPlugin,
|
||||
"on_shutdown",
|
||||
sorting_context="ShutdownPlugin.on_shutdown")
|
||||
|
||||
Reference in new issue
Block a user