icons, main .env

This commit is contained in:
JiriUhlir
2026-06-15 14:07:16 +02:00
parent 35d857f653
commit fa4307852c
12 changed files with 773 additions and 220 deletions
+6 -6
View File
@@ -292,23 +292,23 @@ def get_jobs(
return [dict(row) for row in rows]
def get_jobs_by_types(job_types, limit: int = 20):
def get_jobs_by_target_ids(target_ids, limit: int = 20):
run_migrations()
job_types = list(job_types)
if not job_types:
target_ids = list(target_ids)
if not target_ids:
return []
con = get_connection()
placeholders = ",".join("?" for _ in job_types)
placeholders = ",".join("?" for _ in target_ids)
rows = con.execute(
f"""
SELECT *
FROM jobs
WHERE type IN ({placeholders})
WHERE target_id IN ({placeholders})
ORDER BY id DESC
LIMIT ?
""",
(*job_types, limit),
(*target_ids, limit),
).fetchall()
con.close()