serverless-azure-functions icon indicating copy to clipboard operation
serverless-azure-functions copied to clipboard

support WarmUp Trigger

Open jdaviderb opened this issue 4 years ago • 0 comments

What did you implement:

Closes #574

How did you implement it:

in order to support the warm-up trigger in Serverless, I added the binding manually in the bindings.json file

How can we verify it:

add this config in the serverless.yml

functions:
  warmup:
    handler: src/handlers/warmup.warmupHandler
    events:
      - warmup:
          x-azure-settings:
            name: warmupContext
// src/handlers/warmup.warmupHandler

module.exports.warmupHandler = async function (context, warmupContext) {
    context.log('Function App instance is warm 🌞🌞🌞');
};

Is this ready for review?: YES Is it a breaking change?: NO

Refs https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/azure-functions/functions-bindings-warmup.md https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-warmup?tabs=javascript

jdaviderb avatar Oct 11 '21 16:10 jdaviderb