Skip to content

Commit

Permalink
Scale by queue
Browse files Browse the repository at this point in the history
  • Loading branch information
TheEadie committed Nov 23, 2024
1 parent 2867a3e commit 95d2cce
Showing 1 changed file with 31 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Collections.Generic;
using Pulumi;
using Pulumi.AzureNative.App;
using Pulumi.AzureNative.App.Inputs;
Expand Down Expand Up @@ -26,14 +27,42 @@ public static Job Config(
EnvironmentId = managedEnvironment.Id,
Configuration = new JobConfigurationArgs
{
ManualTriggerConfig = new JobConfigurationManualTriggerConfigArgs
EventTriggerConfig = new JobConfigurationEventTriggerConfigArgs
{
Parallelism = 1,
ReplicaCompletionCount = 1,
Scale = new JobScaleArgs
{
MaxExecutions = 10,
MinExecutions = 0,
PollingInterval = 60,
Rules = new[]
{
new JobScaleRuleArgs
{
Auth = new[]
{
new ScaleRuleAuthArgs
{
SecretRef = "queue-connection",
TriggerParameter = "connection",
},
},
Metadata = new Dictionary<string, string>
{
{"accountName","wormstesttest"},
{"queueName","replays-to-process"},
{"queueLength","1"}
},
Name = "queue",
Type = "azure-queue",
},
},
},
},
ReplicaRetryLimit = 10,
ReplicaTimeout = 3600,
TriggerType = TriggerType.Manual,
TriggerType = TriggerType.Event,
Secrets =
[
new SecretArgs
Expand Down

0 comments on commit 95d2cce

Please sign in to comment.