Azure function didn't realize the trigger on deployment but that work in local
My azure function works correctly locally but when I deploy it on azure. It will return this message:
Deployment successful. deployer = ms-azuretools-vscode deploymentPath = Functions App ZipDeploy. Extract zip. Remote build.
Syncing triggers...
Querying triggers...
No HTTP triggers found.
Uploading settings...
Added the following settings:
- AzureWebJobsFeatureFlags
- FUNCTIONS_WORKER_PROCESS_COUNT
11:43:54 AM: Ignored the following settings that were already the same:
- FUNCTIONS_WORKER_RUNTIME
11:43:54 AM: WARNING: This operation will not delete any settings in "vietnam-trademark-scraper-dev-test". You must manually delete settings if desired.
11:43:54 AM: Excluded the following settings:
- AzureWebJobsStorage
11:43:54 AM: Error: Error "appSettings.properties with value "1" must be of type string." occurred in serializing the payload - "StringDictionary".
in local, I see all trigger work:
I use Python V2 model Azure Functions triggers. I deploy it with a dedicated plan.
I try to sea开发者_运维技巧rch for this problem on google and have no idea to fix it. Can someone explain this problem and suggested me some solutions? Thanks
Glad that it worked for you by adding the setting AzureWebJobsFeatureFlags:EnableWorkerIndexing
and shown the practical in one of my workarounds.
I added this setting and redeployed and it works. But I don't know how it works? Can you explain it?
It is because Microsoft explicitly mentioned to add that application setting for running the Python Programming v2 model in Azure.
Whatever the values we have added related to AzureWebJobsFeatureFlags
are not ready to run in production but can be experimental before they are released completely as defined in this MS Doc of Azure Functions App Settings.
And also, in the V2 Programming model, multiple workers (FUNCTIONS_WORKER_PROCESS_COUNT
) of Python environment is not yet supporting in greater than 1 so this setting needs to be added as a Feature flag to work.
Refer to the GitHub Article on Azure Functions Host of Worker Indexing Changes to Python Environment for related more information.
精彩评论