added scheduler code
This commit is contained in:
+6
-2
@@ -2,9 +2,9 @@ from app_class import AppClass
|
||||
from config import Config, TriggerTuple, MissingConfig
|
||||
|
||||
class Trigger(AppClass):
|
||||
def __init__(self, name: str, _config: Config) -> None:
|
||||
def __init__(self, _config: Config) -> None:
|
||||
super().__init__(_config)
|
||||
self.name = name
|
||||
self.name = "name has to be filled in inherited class and this name has to match the name from config file"
|
||||
|
||||
@property
|
||||
def config(self) -> TriggerTuple:
|
||||
@@ -12,3 +12,7 @@ class Trigger(AppClass):
|
||||
if _config is None:
|
||||
raise MissingConfig(f"Trigger {self.name} hasn't been properly configured")
|
||||
return _config
|
||||
|
||||
def run(self) -> bool:
|
||||
# return True if Trigger is valid
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user