Skip to content

Commit bf52fa3

Browse files
efiShtainjoehan
andauthoredMar 19, 2020
add support for maxInstances in RuntimeOptions (#624)
Co-authored-by: joehan <joehanley@google.com>
1 parent 76bfc9c commit bf52fa3

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed
 

‎src/cloud-functions.ts

+4
Original file line numberDiff line numberDiff line change
@@ -486,5 +486,9 @@ export function optionsToTrigger(options: DeploymentOptions) {
486486
if (options.schedule) {
487487
trigger.schedule = options.schedule;
488488
}
489+
490+
if (options.maxInstances) {
491+
trigger.maxInstances = options.maxInstances;
492+
}
489493
return trigger;
490494
}

‎src/function-configuration.ts

+5
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ export interface RuntimeOptions {
6161
* Timeout for the function in seconds, possible values are 0 to 540.
6262
*/
6363
timeoutSeconds?: number;
64+
65+
/**
66+
* Max number of actual instances allowed to be running in parallel
67+
*/
68+
maxInstances?: number;
6469
}
6570

6671
export interface DeploymentOptions extends RuntimeOptions {

0 commit comments

Comments
 (0)
Please sign in to comment.