Spaces:
Sleeping
Sleeping
| from datetime import datetime | |
| from typing import Dict | |
| class CiSyncMonitor: | |
| def __init__(self): | |
| self.log_file = "memory.log" | |
| def log_event(self, event: Dict[str, str]): | |
| with open(self.log_file, "a", encoding="utf-8") as f: | |
| f.write(f"{datetime.now().isoformat()} | {event['назва']} | {event['вузлові_показники'] if 'вузлові_показники' in event else '-'}\n") | |
| def check_alignment(self, event): | |
| фаза = event.get("вузлові_показники", {}).get("фаза", "") | |
| if фаза.startswith("інь"): | |
| print("[ALIGN] → Спокійна фаза, можливе розширення ідей (Malja)") | |
| elif фаза.startswith("ян"): | |
| print("[ALIGN] → Активна фаза, ініціація подій (PoDija)") | |
| sync_monitor = CiSyncMonitor() |