Feature/add service dbpm3curr #3

Merged
labrec_b merged 7 commits from feature/add-service-dbpm3curr into main 2026-07-14 11:39:58 +02:00
Showing only changes of commit 2eb3620ebf - Show all commits
+8
View File
@@ -39,6 +39,13 @@ class BaseService(Generic[T]):
"""Override this method in child classes to implement service logic."""
raise NotImplementedError("Subclasses must implement the update() loop.")
def on_transition_to_paused(self):
"""
Override this method in child classes to implement custom logic when a
service is transitioned to paused. Does nothing by default.
"""
pass
def transition_to_running(self):
self.status = ServiceStatus.RUNNING
self.pvs.status.put("running")
@@ -46,6 +53,7 @@ class BaseService(Generic[T]):
def transition_to_paused(self):
self.status = ServiceStatus.PAUSED
self.pvs.status.put("paused")
self.on_transition_to_paused()
def finalize_termination(self):
"""Determines the exit reason and safely alerts the ALH watchdogs."""