Deploys & Long Running Jobs

Hey All,

We have a job queue running on render via the “Background Worker” service type. We’re running into issues around interactions between long running jobs and deploys. Specifically, some of our jobs run for several minutes and if a deploy happens at the same time the job is killed mid-run via Render’s SIGTERM/SIGKILL.

In our ideal world, the job would run to completion and then the deploy would happen. Is there a way to do that via Render?

When deployment process started, it will send SIGTERM and wait some seconds, and then SIGKILL is sent. This grace period seconds can’t be configured by user. Therefore the best practice is making you code to listen SIGTERM and do appropriate handle like storing current state.