0

I am working with Azure Function 2.0, Python 3.7 Runtime and Azure Function Tools 2.0.

  • I have a simple blob trigger based functions that read a file containing different urls (www.xxx.com/any,...) and scrape them using library requests and beautifulsoup4
  • The app service plan is not "shared" is based on a specific App Service Plan.
  • The overall timeout is set as 15 minutes (in hosts.json file).

Sometime the action of scrapin an url takes long time and I have found this bad behavior.

  1. The function go into timeout with the blob XXXX
  2. The function continue is invoked again for the blob XXXX, it seems the previous run was unsuccessfull and the runtime re-execute the function.

Questions: - How can i specify that a blob con trigger only one function execution? I would like to rewrite an external check. - Do you have suggestion to limit timeouts for requests in a python function? I have tried the standard timeout and eventlet.Timout without success.

Thanks Ra

RaGus
  • 1

1 Answers1

1

BlobTrigger will run for all blobs that dont have a reciept. There are an issue on github regarding this topic but regarding timestamps on a blob and not quite what you are after.

https://github.com/Azure/azure-webjobs-sdk/issues/1327

Regarding timeouts in function this is by design. You could check out durable functions.

ffffff01
  • 5,068
  • 11
  • 52
  • 61