[34288f42] Keine Zusammenfassung angegeben.
Keine Zusammenfassung angegeben.
This commit is contained in:
25
check_db_links.py
Normal file
25
check_db_links.py
Normal file
@@ -0,0 +1,25 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user