Skip to content

Commit 047b301

Browse files
committed
Added execution status endpoint
1 parent 1dc7ad3 commit 047b301

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/server/api/admin_api.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,20 @@ def list_statistics():
129129
return last_execution_details
130130

131131

132+
@admin_api.route("/api/get_execution_status/<int:job_id>", methods=["GET"])
133+
def get_exec_status(job_id):
134+
kvt = Table("kv_unique", metadata, autoload=True, autoload_with=engine)
135+
with engine.connect() as connection:
136+
s_jobid = 'job-' + str(job_id)
137+
s = text("select valcol from kv_unique where keycol = :j ;")
138+
s = s.bindparams(j=s_jobid)
139+
result = connection.execute(s)
140+
exec_status = result.fetchone()[0]
141+
142+
return exec_status
143+
144+
145+
132146
"""
133147
@admin_api.route('/api/status', methods=['GET'])
134148
def checkStatus():

0 commit comments

Comments
 (0)