Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bachuv committed Nov 7, 2024
1 parent 8470f3d commit b194d21
Showing 1 changed file with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class AzureStorageOptions
private const int MaxTaskHubNameSize = 45;
private const int MinTaskHubNameSize = 3;
private const string TaskHubPadding = "Hub";
private TimeSpan maxQueuePollingInterval;

/// <summary>
/// Gets or sets the name of the Azure Storage connection information used to manage the underlying Azure Storage resources.
Expand Down Expand Up @@ -162,7 +163,27 @@ public string TrackingStoreConnectionStringName
/// Gets or sets the maximum queue polling interval.
/// </summary>
/// <value>Maximum interval for polling control and work-item queues.</value>
public TimeSpan MaxQueuePollingInterval { get; set; } = TimeSpan.FromSeconds(30);
public TimeSpan MaxQueuePollingInterval
{
get
{
if (string.Equals(Environment.GetEnvironmentVariable("WEBSITE_SKU"), "FlexConsumption", StringComparison.OrdinalIgnoreCase))
{
this.maxQueuePollingInterval = TimeSpan.FromSeconds(1);
}
else
{
this.maxQueuePollingInterval = TimeSpan.FromSeconds(30);
}

return this.maxQueuePollingInterval;
}

set
{
this.maxQueuePollingInterval = value;
}
}

/// <summary>
/// Determines whether or not to use the old partition management strategy, or the new
Expand Down

0 comments on commit b194d21

Please sign in to comment.