Initial commit

This commit is contained in:
2026-02-12 17:48:00 -06:00
parent 903df52206
commit 11c4ff5cb7
17 changed files with 1369 additions and 0 deletions

37
scheduler/daemon.py Normal file
View File

@@ -0,0 +1,37 @@
"""
daemon.py - Background polling loop for scheduled tasks
Override poll_callback() with your domain-specific logic.
"""
import time
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
POLL_INTERVAL = int(os.environ.get("POLL_INTERVAL", 60))
def poll_callback():
"""
Override this function with your domain logic.
Called every POLL_INTERVAL seconds.
"""
pass
def daemon_loop():
logger.info("Scheduler daemon starting")
while True:
try:
poll_callback()
except Exception as e:
logger.error(f"Poll callback error: {e}")
time.sleep(POLL_INTERVAL)
if __name__ == "__main__":
import os
daemon_loop()