Add Shutdown Event
This commit is contained in:
parent
86b96b8d4a
commit
e1d58660d7
2 changed files with 2 additions and 0 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Reference in a new issue