Disabled Azure Features Still Running

I'm just starting to test using Microsoft Azure features. I have a VS2017 publication and my function works well. Currently, I have one function that I am working with. It is set on a timer every 5 minutes.

However, it seems that this function is executed even when it is disabled for me. This can be seen in the Monitor and in one of the systems with which it interacts. The only way to stop this is to stop the overall functional group. When I launch a functional group, it launches a disabled function that runs every 5 minutes.

Am I missing something? Does disabling an individual function have other purposes?

How can I get a separate function within a group of functions that will not be executed according to its specific schedule?

Thanks.

+5
source share
1 answer

What you are experiencing is the expected behavior, although not ideal. This is a mistake in the portal.

Function runtime directly consumes metadata in binaries of precompiled functions. Here is an example annotation for the disable feature.

[TimerTrigger("0 */5 * * * *"), Disable()]

This is a .json function created by visual studio over annotations.

 { "generatedBy": "Microsoft.NET.Sdk.Functions.MSBuild-1.0.2", "configurationSource": "attributes", "bindings": [ { "type": "timerTrigger", "schedule": "0 */5 * * * *", "useMonitor": true, "runOnStartup": false, "name": "myTimer" } ], "disabled": true, "scriptFile": "..\\bin\\FunctionApp3.dll", "entryPoint": "FunctionApp3.Function1.Run" } 

The .json function generated by the precompiled functions is consumed by the portal, and this is what the portal shows. When you change the disabled state of a function in the portal, the disabled property changes in the .json function, but it is not consumed by the runtime function. Therefore, it continues to be executed.

When you deploy it in a disconnected state, the runtime is aware of this and evaluates it as expected.

I discovered this error to fix the portal. https://github.com/Azure/azure-functions-ux/issues/1857

+7
source

Source: https://habr.com/ru/post/1272228/


All Articles