many updates

This commit is contained in:
2026-01-13 09:42:16 -08:00
parent 4bb86b603e
commit 362f4cb5aa
81 changed files with 3106 additions and 336 deletions

View File

@@ -0,0 +1,27 @@
from src.services.postgresql_manager import PostgreSQLManager
from src.utils.config import config
from src.models.scheduled_job import ScheduledJob
from src.services.scheduler import scheduler
def verify_jobs():
db = PostgreSQLManager(config.DATABASE_URL)
# Run ensure_defaults to populate DB
scheduler.ensure_defaults()
with db.get_db_session() as session:
jobs = session.query(ScheduledJob).all()
print("Scheduled Jobs in DB:")
for j in jobs:
print(f"- {j.name} (Type: {j.job_type}, Enabled: {j.enabled})")
reparse = next((j for j in jobs if j.job_type == 'reparse_local_files'), None)
estimate = next((j for j in jobs if j.job_type == 'estimate_power'), None)
if reparse and estimate:
print("\nSUCCESS: Both new jobs found.")
else:
print("\nFAILURE: Missing new jobs.")
if __name__ == "__main__":
verify_jobs()