You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
500 B
19 lines
500 B
from abc import ABC, abstractmethod
|
|
from exporter import SafetyExporter
|
|
from models import SafetyStatus, SafetyLevel
|
|
import logging
|
|
|
|
logger = logging.getLogger("Checker.Base")
|
|
|
|
|
|
class BaseChecker(ABC):
|
|
def __init__(self, name: str, config: dict, exporter: SafetyExporter):
|
|
self.name = name
|
|
self.config = config
|
|
self.exporter = exporter
|
|
|
|
@abstractmethod
|
|
def run_once(self) -> SafetyStatus:
|
|
"""Run a single check cycle and return the result."""
|
|
pass
|