From 3a2d193e57d528d1664005781e2cce993b2794a2 Mon Sep 17 00:00:00 2001 From: Varshitha Bachu Date: Tue, 10 Oct 2023 10:38:53 -0700 Subject: [PATCH] initial commit (#290) --- .../DurableTask.Netherite.AzureFunctions.csproj | 4 ++-- .../NetheriteProvider.cs | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/DurableTask.Netherite.AzureFunctions/DurableTask.Netherite.AzureFunctions.csproj b/src/DurableTask.Netherite.AzureFunctions/DurableTask.Netherite.AzureFunctions.csproj index 444b9278..b7b9eb6a 100644 --- a/src/DurableTask.Netherite.AzureFunctions/DurableTask.Netherite.AzureFunctions.csproj +++ b/src/DurableTask.Netherite.AzureFunctions/DurableTask.Netherite.AzureFunctions.csproj @@ -26,9 +26,9 @@ 1 4 - 0 + 1 $(MajorVersion).$(MinorVersion).$(PatchVersion) - + private $(MajorVersion).0.0.0 .$(GITHUB_RUN_NUMBER) $(VersionPrefix)$(BuildSuffix) diff --git a/src/DurableTask.Netherite.AzureFunctions/NetheriteProvider.cs b/src/DurableTask.Netherite.AzureFunctions/NetheriteProvider.cs index 6f8f491e..1d3f64c6 100644 --- a/src/DurableTask.Netherite.AzureFunctions/NetheriteProvider.cs +++ b/src/DurableTask.Netherite.AzureFunctions/NetheriteProvider.cs @@ -145,7 +145,12 @@ class ScaleMonitor : IScaleMonitor public ScaleMonitor(ScalingMonitor scalingMonitor) { this.scalingMonitor = scalingMonitor; - this.descriptor = new ScaleMonitorDescriptor($"DurableTaskTrigger-Netherite-{this.scalingMonitor.TaskHubName}".ToLower()); + + // appending random GUID to end of descriptor to keep scale monitor keys unique + string guid = Guid.NewGuid().ToString("N"); + + var descriptorId = $"DurableTaskTrigger-Netherite-{this.scalingMonitor.TaskHubName}-{guid}".ToLower(); + this.descriptor = new ScaleMonitorDescriptor(descriptorId); } public ScaleMonitorDescriptor Descriptor => this.descriptor;