Skip to content
Snippets Groups Projects
Commit d6c46db7 authored by Petar Hristov's avatar Petar Hristov :speech_balloon:
Browse files

New: Add configurable timeout for API requests

parent ca8de54e
Branches
Tags
No related merge requests found
...@@ -38,7 +38,7 @@ public class Deployer ...@@ -38,7 +38,7 @@ public class Deployer
BasePath = $"{_graphDeployerConfiguration.Endpoint.TrimEnd('/')}/coscine", BasePath = $"{_graphDeployerConfiguration.Endpoint.TrimEnd('/')}/coscine",
ApiKeyPrefix = { { "Authorization", "Bearer" } }, ApiKeyPrefix = { { "Authorization", "Bearer" } },
ApiKey = { { "Authorization", _graphDeployerConfiguration.ApiKey } }, ApiKey = { { "Authorization", _graphDeployerConfiguration.ApiKey } },
Timeout = 300000 // 5 minutes Timeout = _graphDeployerConfiguration.Timeout ?? 300000 // 5 minutes
}; };
// Check if the graph deployer has to skip SSL checks when connecting to the API // Check if the graph deployer has to skip SSL checks when connecting to the API
... ...
......
...@@ -33,6 +33,11 @@ public class GraphDeployerConfiguration ...@@ -33,6 +33,11 @@ public class GraphDeployerConfiguration
/// </summary> /// </summary>
public string Endpoint { get; set; } = null!; public string Endpoint { get; set; } = null!;
/// <summary>
/// The timeout in milliseconds for the API requests.
/// </summary>
public int? Timeout { get; set; }
/// <summary> /// <summary>
/// Logger configuration settings. /// Logger configuration settings.
/// </summary> /// </summary>
... ...
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"ApiKey": null, "ApiKey": null,
"Endpoint": null, "Endpoint": null,
"IsEnabled": true, "IsEnabled": true,
"Timeout": 300000,
"WorkingFolder": "./Output/", "WorkingFolder": "./Output/",
"Logger": { "Logger": {
"LogLevel": "Information", "LogLevel": "Information",
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment