mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 16:58:12 +00:00
Persist args in db and return args in job json (#82)
This commit is contained in:
@@ -62,7 +62,7 @@ def jobs_json():
|
||||
return {'jobs': all_jobs, 'token': job_cache_token}
|
||||
except Exception as e:
|
||||
logger.exception(f"Exception fetching jobs_json: {e}")
|
||||
return [], 500
|
||||
return {}, 500
|
||||
|
||||
|
||||
@server.get('/api/jobs_long_poll')
|
||||
@@ -76,11 +76,11 @@ def long_polling_jobs():
|
||||
return all_jobs
|
||||
# Break after 30 seconds to avoid gateway timeout
|
||||
if time.time() - start_time > 30:
|
||||
return [], 204
|
||||
return {}, 204
|
||||
time.sleep(1)
|
||||
except Exception as e:
|
||||
logger.exception(f"Exception fetching long_polling_jobs: {e}")
|
||||
return [], 500
|
||||
return {}, 500
|
||||
|
||||
|
||||
@server.route('/api/job/<job_id>/thumbnail')
|
||||
|
||||
Reference in New Issue
Block a user