0
votes

We are working on azure function. In dev we have consumption model, while in higher env we have premium model. I want my timeout property in host.json to come from app setting or through any means should be configurable. So that I can configure it to be 10 minutes for dev and 60 minutes for prod.

Is it possible to do this?

I tried using this FunctionTimeout : "%timout_appsetting%"

But this didn't worked.

1
Yes, it is possible. Can you show the host.json of your function? - Cindy Pau
{"version": "2.0" , "functionTimeout": "00:10:00"} - lokesh
I am.looking to make this function timeout configurable. Even if it is through deployment that should do for me. - lokesh
Yes, it can be configured. Where you add the settings? on portal or on local? Have you check the host.json on portal? - Cindy Pau
On portal under application settings. App setting detail FUNCTION_TIMEOUT - 00:10:00 ... I then used this in host.json as "functionTimeout": "%FUNCTION_TIMEOUT%".. But this didn't worked. - lokesh

1 Answers

0
votes

I build my function on my local machine and the output was stored under "obj\Release\netcoreapp2.1\PubTmp\Out". Here you can find the host.json file and you could replace the timeout by any scripting language like PowerShell.