Skip to content
Snippets Groups Projects
Commit 0aefcd3f authored by Julian Rother's avatar Julian Rother
Browse files

Fixed json handling job api endpoint

parent e3495a26
No related branches found
No related tags found
No related merge requests found
...@@ -103,7 +103,7 @@ def jobs_worker_ping(hostname): ...@@ -103,7 +103,7 @@ def jobs_worker_ping(hostname):
@jobs_api_token_required @jobs_api_token_required
def jobs_ping(id): def jobs_ping(id):
hostname = request.values['host'] hostname = request.values['host']
status = json.dumps(request.values['status'], default=date_json_handler) status = json.dumps(json.loads(request.values['status']), default=date_json_handler)
state = request.values['state'] state = request.values['state']
if state == 'finished': if state == 'finished':
query('UPDATE jobs SET time_finished = ?, status = ?, state = "finished" where id = ?', datetime.now(), status, id) query('UPDATE jobs SET time_finished = ?, status = ?, state = "finished" where id = ?', datetime.now(), status, id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment