I have an app running on the app platform. It is a simple flask server that allows for file uploads. Those files then get processed and analyzed in a job via a background process that sits and waits for jobs to be added to a queue (using a sql db for this).
What happens when I deploy an update to my code via GitHub? Does the current code that is running just get terminated? I don’t want a job to get stopped before it finishes. If it does just get terminated, is there a way to run some code before it get switched out, so that the update can finish the job? Or is there a way to prevent the deployment from happening until there are no current jobs?
Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
Hi there,
When you deploy an update to your app on DigitalOcean’s App Platform, the platform uses a rolling deployment strategy by default. This means it will bring up a new instance of your service with the new code while the old instance is still running. Once the new instance is healthy and ready to serve traffic, the old instance is terminated.
For your use case, there are a couple of things you could consider:
Hope that this helps!
Best,
Bobby