Files
Brancheneinstufung2/check_db_links.py
Floke d90d856620 [34288f42] Keine Zusammenfassung angegeben.
Keine Zusammenfassung angegeben.
2026-05-04 06:53:45 +00:00

26 lines
705 B
Python

import sqlite3
import os
db_path = "/app/fotograf-de-scraper/backend/data/fotograf_jobs.db"
if not os.path.exists(db_path):
print(f"Database not found at {db_path}")
else:
conn = sqlite3.connect(db_path)
cursor = conn.cursor()
# Check candidates missing links for the current job
job_id = "576228454"
cursor.execute("""
SELECT COUNT(*)
FROM job_participants
WHERE job_id = ?
AND has_orders = 0
AND digital_package_ordered = 0
AND logins <= 5
AND quick_login_url IS NULL
""", (job_id,))
missing = cursor.fetchone()[0]
print(f"Missing links for candidates in job {job_id}: {missing}")
conn.close()