【发布时间】:2022-12-01 14:14:38
【问题描述】:
I am trying to trigger an Azure Function from Logic Apps. Running the Azure function takes more than 2 minutes as it is reading a file from a location, converts it to another format and then writes it to a different location. The problem is that the Logic Apps is creating a request, waits for 2 minutes to get a response, but this response doesn't come because the function is not finishing that fast. So the logic app assumes there is an error and recreates the request.
I read in the documentation that there is no way to increase the timeout period. I tried creating two threads in the azure function. One returns 202 http status code to the logic app, and the other one would remain as a daemon and keeps running. But the file doesn't seem to be copied.
Does anyone have any idea how could this be achieved?
【问题讨论】:
-
Do you need the response for anything? Since you tried with 202, I guess you don't really care about the result "right now", and thus, could just queue the actual work in a different trigger, e.g. with a queue and have a
QueueTriggerdoing the actual conversion work.
标签: python azure-functions azure-logic-apps