Azure resource for long running process in python

Bjørn Hartmann 1 Reputation point
2022-04-04T14:56:42.78+00:00

Hi, I am trying to figure out the best way to run a python process typically taking 10-30 minutes on my local machine. The process will be manually triggered, and may not be triggered for ours or days.

I am a bit confused, because I read official ms-docs stating that one should avoid long running processen in function apps (https://learn.microsoft.com/en-us/azure/azure-functions/performance-reliability#avoid-long-running-functions) but at the same time, the functionTimeout for the Premium and dedicated plans can be unlimited.

I am hesitant to use a standard web app with an API since it seems overkill to have it running 24/7.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,679 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Lohith GN 511 Reputation points
    2022-04-04T23:33:56.527+00:00

    @Bjørn Hartmann

    In the Azure Functions landscape, we have Durable Functions. Usually, this is used for stateful functions. But also can be used for scenarios where your code may take more time than the allotted 10min.

    You can read about Durable Functions here: https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=csharp

    Here is a tutorial to create Durable Function in Python: https://learn.microsoft.com/en-us/azure/azure-functions/durable/quickstart-python-vscode

    Hope this helps.


  2. Bjørn Hartmann 1 Reputation point
    2022-04-08T12:25:25.4+00:00

    Hi, thank you so much for getting back to me.
    The process described in the mentioned tutorial to create durable function in python is, as far as i understand, the Pattern #3: Async HTTP APIs. I dont see how this is causing the function to run any longer? We are still using an azure function for the DO WORK step? If in a consumption plan, this should have time-out of maximum 10 minutes?

    Any help is greatly appreciated

    0 comments No comments