Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MaxQueuePollingInterval default for Flex Consumption apps #2953

Merged
merged 7 commits into from
Dec 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
bachuv marked this conversation as resolved.
Show resolved Hide resolved
{
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
Loading