Open pdthummar opened 1 year ago
EventGrid examples
Warmup Trigger example would be helpfull
@vrdmr Can you please suggest how can I add a warmup function for Azure Functions V2 with Service Bus Trigger
. We are implementing a unified health check for all the Azure Functions.
I am expecting something like this:
@sudharsan2020 there may only be one warmup function per app. You can create a single warmup function as shown below, and then create separate functions for your service bus triggers. Thanks
import azure.functions as func
import logging
app = func.FunctionApp()
@app.warm_up_trigger('warmup')
def warmup(warmup) -> None:
logging.info('Function App instance is warm')
@pdthummar How do I trigger the warmup function. I didn't see any sufficient documentation on this. We are required to do a health check of our Azure function across multiple regions on a periodic basis
@sudharsan2020 A warmup trigger is invoked when an instance is added to scale a running function app. The warmup trigger lets you define a function that's run when a new instance of your function app is started.
For more info, please refer: Azure Functions warmup trigger Thanks
@sudharsan2020 there may only be one warmup function per app. You can create a single warmup function as shown below, and then create separate functions for your service bus triggers. Thanks
import azure.functions as func import logging app = func.FunctionApp() @app.warm_up_trigger('warmup') def warmup(warmup) -> None: logging.info('Function App instance is warm')
When testing in Azure, I get System.NotImplementedException at Microsoft.Azure.WebJobs.Host.Bindings.TriggerAdapterBindingProvider`2+ExactBinding+
Docs update needed for following triggers/bindings: Table Warmup Trigger SB Queue Output