Skip to content

Commit

Permalink
refactor: assert stop() and log desctructor
Browse files Browse the repository at this point in the history
  • Loading branch information
furkan-bilgin committed Oct 9, 2024
1 parent b7d0a21 commit bc3573e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/daq/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ def start(self):
pass

def stop(self):
assert not self._should_stop, "DAQ job is already stopped"
self._should_stop = True

def __del__(self):
self.logger.info("DAQ job is being deleted")


@dataclass
class DAQJobThread:
Expand Down

0 comments on commit bc3573e

Please sign in to comment.