0

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.

7
  • Yes, it is possible. Can you show the host.json of your function? Commented Feb 25, 2020 at 5:14
  • {"version": "2.0" , "functionTimeout": "00:10:00"} Commented Feb 25, 2020 at 5:44
  • I am.looking to make this function timeout configurable. Even if it is through deployment that should do for me. Commented Feb 25, 2020 at 5:45
  • Yes, it can be configured. Where you add the settings? on portal or on local? Have you check the host.json on portal? Commented Feb 25, 2020 at 5:47
  • 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. Commented Feb 25, 2020 at 5:54

1 Answer 1

0

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.