Integrate watchdog into render worker (#88)

* Add a watchdog to base_worker

* Logging cleanup

* Prevent multiple watchdogs from running if render process restarts

* Add process timeout parameter to Config

* Refactor

* Add error handling to process output parsing

* Fix issue where start_time was not getting set consistently
This commit is contained in:
2024-08-06 10:48:24 -05:00
committed by GitHub
parent 90d5e9b7af
commit 6afb6e65a6
5 changed files with 99 additions and 41 deletions

View File

@@ -61,7 +61,7 @@ def jobs_json():
job_cache_token = num_to_alphanumeric(job_cache_int)
return {'jobs': all_jobs, 'token': job_cache_token}
except Exception as e:
logger.exception(f"Exception fetching jobs_json: {e}")
logger.error(f"Error fetching jobs_json: {e}")
return {}, 500
@@ -79,7 +79,7 @@ def long_polling_jobs():
return {}, 204
time.sleep(1)
except Exception as e:
logger.exception(f"Exception fetching long_polling_jobs: {e}")
logger.error(f"Error fetching long_polling_jobs: {e}")
return {}, 500