12345678910111213141516171819 |
- from abc import ABC, abstractmethod
- class EventProcessorBase(ABC):
- @abstractmethod
- def should_run(self) -> bool:
- return False
- @abstractmethod
- def transform(self):
- return self.data
- def __init__(self, release_id, data):
- self.release_id = release_id
- self.data = data
- def run(self):
- if self.should_run():
- self.transform()
|