Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
/ NuGet.Jobs Public archive

[Orchestrator] Increase the connection limit #677

Merged
merged 1 commit into from
Nov 26, 2018
Merged
Changes from all commits
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
7 changes: 7 additions & 0 deletions src/NuGet.Services.Validation.Orchestrator/Job.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ namespace NuGet.Services.Validation.Orchestrator
{
public class Job : JobBase
{
/// <summary>
/// The maximum number of concurrent connections that can be established to a single server.
/// </summary>
private const int MaximumConnectionsPerServer = 64;

private const string ConfigurationArgument = "Configuration";
private const string ValidateArgument = "Validate";

Expand Down Expand Up @@ -93,6 +98,8 @@ public class Job : JobBase

public override void Init(IServiceContainer serviceContainer, IDictionary<string, string> jobArgsDictionary)
{
ServicePointManager.DefaultConnectionLimit = MaximumConnectionsPerServer;

var configurationFilename = JobConfigurationManager.GetArgument(jobArgsDictionary, ConfigurationArgument);
_validateOnly = JobConfigurationManager.TryGetBoolArgument(jobArgsDictionary, ValidateArgument, defaultValue: false);

Expand Down