Skip to content

Commit

Permalink
Merge pull request #953 from opengisch/QF-4070-followup-fix-delta-aft…
Browse files Browse the repository at this point in the history
…er-docker-sigkill

Execute "after_docker_exception" on DOCKER_ENGINE_SIGKILL
  • Loading branch information
suricactus authored May 27, 2024
2 parents ba9c5c2 + 190cb6a commit 07255eb
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions docker-app/worker_wrapper/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,21 +157,14 @@ def run(self):
feedback["error_stack"] = ""

try:
logger.info(
"Set job status to `failed` due to being killed by the docker engine.",
)

self.job.output = output.decode("utf-8")
self.job.feedback = feedback
self.job.status = Job.Status.FAILED
self.job.save(update_fields=["output", "feedback", "status"])
self.job.refresh_from_db()
except Exception as err:
logger.error(
"Failed to update job status, probably does not exist in the database.",
exc_info=err,
)
# No further action required, probably received by wrapper's autoclean mechanism when the `Project` is deleted
return
# No further action required, probably received by wrapper's autoclean mechanism when the `Project` is deleted
return
elif exit_code == TIMEOUT_ERROR_EXIT_CODE:
feedback["error"] = "Worker timeout error."
feedback["error_type"] = "TIMEOUT"
Expand Down

0 comments on commit 07255eb

Please sign in to comment.