Is there a way to disable all functions in a deployment slot?
See original GitHub issueIs there a similar setting to WEBJOBS_STOPPED
that can be turned on and it’ll disable all of your functions from running? My project is node based if that matters.
I’m trying to change my deployment process to use a deployment slot, auto swap, and zip push. I’d like to turn the functions off in the staging slot once this is working. I could setup a secondary storage account for the staging slot, but since this is just a deployment target for auto swap it’d be much easier to just turn them all off with a slot setting.
I also don’t want the old version of my functions running along side the production version post swap. For my web apps I set WEBJOBS_STOPPED
to 1
in the staging slots but that didn’t seem to do anything for my functions app.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:12
- Comments:24 (4 by maintainers)
Top Results From Across the Web
How to disable functions in Azure Functions
Navigate to the slot instance of your function app by selecting Deployment slots under Deployment, choosing your slot, and selecting Functions ...
Read more >Azure Function - disable all the Functions in an app?
One can use app settings AzureWebJobs.<FUNCTION_NAME>.Disabled to disable individual Functions in an Azure Function. However, that of course ...
Read more >Function app + Deployment slot + Timer triggered functions
Hello, We would like to deploy a function app that has timer-triggered functions. The function when triggered saves data to the Azure SQL ......
Read more >Azure Deployment Slots: Benefits and How to Use Them
Azure deployment slots are one of the killer features for Azure App Services. Learn what they are, how to use them, and the...
Read more >Continuous Deployment of Azure Functions with Slots
Tutorial for setting up Continuous Deployment of Azure Functions using deployment slots and auto swapping features on Microsoft Azure.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In my opinion, all functions that are triggered automatically, like timer and queue, should be disabled by default, in the deployment slot.
I think it is quite common to use deployment slots like this:
That brings your new and bug free code to production. Great.
You don’t want your buggy code still running in the deployment slot, causing errors that you thought you already solved.
Edit: after some confusion I got the suggestion above to work. You need to disable each function in your staging slot individually. Once that is done, go into your staging slot’s application settings and notice that there are new settings listed, named AzureWebJobs.FunctionName.Disabled, one for each of your functions. You need to enable the “slot setting” checkbox next to each of those to make sure it is a slot-specific setting that doesn’t carry over when you swap.
Overall not the smoothest experience, and certainly prone to issues if functions are added or renamed. Would be nice if there was just a single application setting by convention that disabled all functions.
If I have a function app using mostly timer and queue triggered functions, should I even be using staging slots for my deployments? I don’t want my functions in the staging slot competing for timer trigger locks and queue message locks with my actual production code.