We have an Azure Website setup with an “intermediate” slot for deployment, and we use continuous Azure WebJob to handle long background jobs. It appears that when you publish to the Website (and include WebJob binaries), WebJob will restart if it was previously stopped.
Our current deployment process is as follows:
- Deployment for STAGING
- Stop WebJob immediately and quickly. STAGING (try to prevent the processing of 2 WebJobs messages)
- Smoke test and check the code when performing STAGING operations
- Stop the PRODUCT web application (let it clear the queue messages)
- Exchange between PRODUCTION AND STAGING
- Launch Producation WebJob (which was only STAGING WebJob).
Is there a trick (say, a flag file or something else) to tell WebJob to NOT run after publication?
ericb source
share