Context
Problem
The celery runs absolutely fine.
However, when I set up a trigger from the storage queue, it doesn't work. I try by manually sending a message in the Queue.
Here are some code for reference
function.json
{
"bindings": [
{
"name": "myQueueItem",
"type": "queueTrigger",
"direction": "in",
"queueName": "%AZURE_STORAGE_QUEUE_NAME%",
"connection": "AzureWebJobsStorage"
}
],
"disabled": false
}
settings.job
{
"stopping_wait_time": 60,
"is_singleton": true
}
run.sh
#!/bin/bash
# Activate the Python environment
echo "Triggerd"
Attempts
AzureWebJobsStorage__credential: 'managedidentity'
AzureWebJobsStorage__accountName: storageAccount.name
AzureWebJobsStorage__queueServiceUri: 'https://${storageAccount.name}.queue.${storageSuffix}/'
I have tried combination of 1 and 2 along with different configuration in function.json
, nothing works.
Edit:
Storage Blob Data Contributor
and Storage Queue Data Contributor
to Azure Web App Service.You would need to create Python Function App, please see the example below:
https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-queue-trigger?tabs=python-v2%2Cisolated-process%2Cnodejs-v4%2Cextensionv5&pivots=programming-language-python
For Python triggers and bindings are not supported to run as web job, instead you would need to create function app.