Running processes interrupted when deploying Azure App Service

Clas Peterson 1 Reputation point

We are moving to Azure and need to get a solution regarding batch jobs vs App Service deployment/restarts.

We have quite a lot of App Services running Ubuntu Linux/PHP. On almost every one, we have batch jobs started by Logic Apps in Azure.
There is also a staging slot to each production slot.

The problem here is that when we are deploying new code (via Pipelines) out to the App Service, the server will get restarted.
That means that if the Logic App has started a long running PHP batch job, the process will get interrupted when we are deploying out to the production server due to the restart. In this case the staging/production slot configuration doesn't help us getting an uninterrupted batch job process since the swap doesn't check for running processes before swapping.

Does anyone have a solution to how we could solve this problem?

Thank you

Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
212 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,209 questions
{count} votes