Skip to content

Commit 4ef387a

Browse files
earlocggailey777
authored andcommitted
docs: adopt host's expectations about naming of warmup-function and -trigger
1 parent 2c6d44d commit 4ef387a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

articles/azure-functions/functions-bindings-warmup.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ The following considerations apply when using a warmup trigger:
2424
* The warmup trigger is only called during scale-out operations, not during restarts or other nonscaling startups. Make sure your logic can load all required dependencies without relying on the warmup trigger. Lazy loading is a good pattern to achieve this goal.
2525
* Dependencies created by warmup trigger should be shared with other functions in your app. To learn more, see [Static clients](manage-connections.md#static-clients).
2626
* If the [built-in authentication](../app-service/overview-authentication-authorization.md) (also known as Easy Auth) is used, [HTTPS Only](../app-service/configure-ssl-bindings.md#enforce-https) should be enabled for the warmup trigger to get invoked.
27+
* [Where applicable](https://github.com/Azure/azure-functions-host/blob/bc21cd69782312508f95d85d60863b8881de2c11/src/WebJobs.Script/Host/ScriptJobHostExtensions.cs#L36)
28+
* the function must be named `Warmup` (case-insensitive) in order to be picked up by the host.
29+
* the function-trigger must be named `WarmupTrigger` (case-insensitive) in order to be picked up by the host.
2730

2831
## Example
2932

@@ -127,7 +130,7 @@ module.exports = async function (warmupContext, context) {
127130

128131
The following example shows a [TypeScript function](functions-reference-node.md) with a warmup trigger that runs on each new instance when added to your app:
129132

130-
:::code language="typescript" source="~/azure-functions-nodejs-v4/ts/src/functions/warmupTrigger1.ts" :::
133+
:::code language="typescript" source="~/azure-functions-nodejs-v4/ts/src/functions/warmupTrigger.ts" :::
131134

132135
# [Model v3](#tab/nodejs-v3)
133136
TypeScript samples aren't documented for model v3.
@@ -215,7 +218,8 @@ Warmup triggers don't require annotations. Just use a name of `warmup` (case-ins
215218

216219
# [Model v4](#tab/nodejs-v4)
217220

218-
There are no properties that need to be set on the `options` object passed to the `app.warmup()` method.
221+
- Your function-trigger must be named `warmupTrigger` (case-insensitive).
222+
- There are no properties that need to be set on the `options` object passed to the `app.warmup()` method.
219223

220224
# [Model v3](#tab/nodejs-v3)
221225

0 commit comments

Comments
 (0)