Reputation: 2124
I have a web app where clients can press a button that calls a durable function. As long as that function is executing, a spinning wheel is animated. When the function finishes executing, I stop/hide the loading wheel, and show a green check-mark.
Currently, I'm just hitting the "statusQueryGetUri" returned by the durable function, on a regular interval, to see if the function is running/stopped.
Is there a way for me to 'listen' for changes in status so I'm not hitting that URL repeatedly?
Upvotes: 0
Views: 399
Reputation: 60751
You can set up a timer-triggered logic app that will do this for you on a recurrent schedule.
Upvotes: 0
Reputation: 961
You may follow this link to configure the email/ any notification alert for your azure functions.
You may also check these links for step by step implementation :
https://learn.microsoft.com/en-us/azure/azure-monitor/platform/alerts-log
While you create the alert rule you have an option to select condition:
There you get "Custom Log Search" as an option:
You can configure the type of trigger or resource on which you want to perform this action while creating the action group:
You can customize the rule according to your requirement. i.e. you can check for traces log for any execution or you may just check the status of the function. [ this is a reference ]
You may look into these documents for reference:
https://www.fourmoo.com/2020/02/19/how-to-configure-azure-function-app-notifications-for-errors/
Upvotes: 1