aboutsummaryrefslogtreecommitdiffstats
path: root/deckit/module.py
diff options
context:
space:
mode:
Diffstat (limited to 'deckit/module.py')
-rw-r--r--deckit/module.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/deckit/module.py b/deckit/module.py
index fd5997c..f1a7fa1 100644
--- a/deckit/module.py
+++ b/deckit/module.py
@@ -37,6 +37,22 @@ class Registry:
_get = get
+ def start_all(self) -> None:
+ for m in self._modules.values():
+ if m.start:
+ try:
+ m.start()
+ except Exception:
+ pass
+
+ def stop_all(self) -> None:
+ for m in self._modules.values():
+ if m.stop:
+ try:
+ m.stop()
+ except Exception:
+ pass
+
def state(self, name: str) -> dict:
return self._get(name).state()