life jobs logs
This commit is contained in:
@@ -346,6 +346,26 @@ def get_job_logs(job_id: int, limit: int = 1000):
|
||||
return [dict(row) for row in rows]
|
||||
|
||||
|
||||
def get_job_logs_after(job_id: int, last_log_id: int = 0, limit: int = 100):
|
||||
run_migrations()
|
||||
con = get_connection()
|
||||
|
||||
rows = con.execute(
|
||||
"""
|
||||
SELECT *
|
||||
FROM job_logs
|
||||
WHERE job_id = ?
|
||||
AND id > ?
|
||||
ORDER BY id
|
||||
LIMIT ?
|
||||
""",
|
||||
(job_id, last_log_id, limit),
|
||||
).fetchall()
|
||||
|
||||
con.close()
|
||||
return [dict(row) for row in rows]
|
||||
|
||||
|
||||
def has_active_deploy_job(target_type: str, target_id: str):
|
||||
run_migrations()
|
||||
con = get_connection()
|
||||
|
||||
Reference in New Issue
Block a user