Azure / azure-functions-python-library

Azure Functions Python SDK
MIT License
150 stars 63 forks source link

Adding Warmup trigger decorator for Programming Model V2 #158

Closed YunchuWang closed 1 year ago

YunchuWang commented 1 year ago

Adding support for Azure function warmup trigger. The warmup trigger lets you define a function that's run when a new instance of your function app is started. You can use a warmup trigger to pre-load custom dependencies during the pre-warming process, so your functions are ready to start processing requests immediately.

codecov[bot] commented 1 year ago

Codecov Report

Merging #158 (925a9c0) into dev (f91aad3) will increase coverage by 0.09%. The diff coverage is 100.00%.

:exclamation: Current head 925a9c0 differs from pull request most recent head 65e8403. Consider uploading reports for the commit 65e8403 to get more accurate results

@@            Coverage Diff             @@
##              dev     #158      +/-   ##
==========================================
+ Coverage   90.26%   90.35%   +0.09%     
==========================================
  Files          51       53       +2     
  Lines        2998     3027      +29     
  Branches      797      800       +3     
==========================================
+ Hits         2706     2735      +29     
  Misses        215      215              
  Partials       77       77              
Flag Coverage Δ
unittests 90.32% <100.00%> (+0.09%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
azure/functions/__init__.py 100.00% <100.00%> (ø)
azure/functions/decorators/constants.py 100.00% <100.00%> (ø)
azure/functions/decorators/function_app.py 99.46% <100.00%> (+0.01%) :arrow_up:
azure/functions/decorators/warmup.py 100.00% <100.00%> (ø)
azure/functions/warmup.py 100.00% <100.00%> (ø)
azure/functions/_http.py 93.04% <0.00%> (-0.18%) :arrow_down:
azure/functions/_http_asgi.py 90.42% <0.00%> (+0.10%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.