Fix calendar filter, module triggers, API cleanup, consolidate get_current_admin, fix LLM schema
This commit is contained in:
@@ -19,8 +19,13 @@ def run_collector():
|
||||
script_path = PROJECT_ROOT / "scripts" / "collector.py"
|
||||
if not script_path.exists():
|
||||
raise FileNotFoundError(f"Collector script not found: {script_path}")
|
||||
venv_python = PROJECT_ROOT / "platform" / "backend" / "venv" / "bin" / "python"
|
||||
if venv_python.exists():
|
||||
cmd = [str(venv_python), str(script_path)]
|
||||
else:
|
||||
cmd = ["python3", str(script_path)]
|
||||
result = subprocess.run(
|
||||
["python", str(script_path)],
|
||||
cmd,
|
||||
capture_output=True,
|
||||
text=True,
|
||||
cwd=PROJECT_ROOT,
|
||||
|
||||
@@ -62,7 +62,7 @@ class TaskScheduler:
|
||||
)
|
||||
self.scheduler.start()
|
||||
self._started = True
|
||||
logger.info("Scheduler started with daily cron triggers (01:30 collect, 02:30 sync, 03:30 generate, 04:30 optimize, 05:00 optimize_sources, 06:00 metrics_sync)")
|
||||
logger.info("Scheduler started: 01:30 collect, 03:30 generate, 04:30 review, 05:00 optimize_sources, 06:00 metrics_sync")
|
||||
def shutdown(self):
|
||||
if self.scheduler.running:
|
||||
self.scheduler.shutdown()
|
||||
@@ -86,11 +86,11 @@ class TaskScheduler:
|
||||
|
||||
def _run_optimize(self):
|
||||
try:
|
||||
logger.info("[Scheduled] Starting compliance optimization...")
|
||||
logger.info("[Scheduled] Starting compliance review...")
|
||||
result = run_optimizer()
|
||||
logger.info("[Scheduled] Optimization completed: %s", result)
|
||||
logger.info("[Scheduled] Review completed: %s", result)
|
||||
except Exception as e:
|
||||
logger.exception("[Scheduled] Optimization failed: %s", e)
|
||||
logger.exception("[Scheduled] Review failed: %s", e)
|
||||
|
||||
def _run_collect(self):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user