moonraker: add method to set a component as failed
Some components require post-load initialization after the IOLoop has started. Provide a method for these components to register a failure with the server. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
331be63c9e
commit
06bbca7ae3
|
@ -222,6 +222,10 @@ class Server:
|
|||
raise ServerError(f"Component ({component_name}) not found")
|
||||
return component
|
||||
|
||||
def set_failed_component(self, component_name: str) -> None:
|
||||
if component_name not in self.failed_components:
|
||||
self.failed_components.append(component_name)
|
||||
|
||||
def register_notification(self,
|
||||
event_name: str,
|
||||
notify_name: Optional[str] = None
|
||||
|
|
Loading…
Reference in New Issue