Created ExpiredOOOStatusWorker

This commit is contained in:
Chase Tucker
2024-03-25 12:22:26 -07:00
parent 27f78da969
commit 69fdd98ab3
46 changed files with 549 additions and 5118 deletions

View File

@ -31,23 +31,23 @@ public class MonInWorkerClient : IMonInWorkerClient {
_httpClientFactory = httpClientFactory;
if (_httpClientFactory is null) throw new ArgumentNullException("IHttpClientFactory not injected");
_config = config;
if (_config is null) throw new ArgumentNullException("IConfiguration not injected");
_config = config ??
throw new ArgumentNullException("IConfiguration not injected");
_logger = logger;
if (_logger is null) throw new ArgumentNullException("ILogger not injected");
_logger = logger ??
throw new ArgumentNullException("ILogger not injected");
_baseUrl = _config["MonIn:workerUrl"];
if (_baseUrl is null) throw new ArgumentNullException("MonIn:workerUrl not found in config");
_baseUrl = Environment.GetEnvironmentVariable("MonInWorkerUrl") ??
throw new ArgumentNullException("MonInWorkerUrl environment variable not found");
Int32.TryParse(_config["MonIn:retries"], out _retryLimit);
if (_retryLimit == -1) throw new ArgumentNullException("MonIn:retries not found in config");
if (!Int32.TryParse(Environment.GetEnvironmentVariable("MonInRetries"), out _retryLimit))
throw new ArgumentNullException("Valid MonInRetries environment variable not found");
Int32.TryParse(_config["MonIn:backoffInSeconds"], out _backoffInSeconds);
if (_backoffInSeconds == -1) throw new ArgumentNullException("MonIn:backoffInSeconds not found in config");
if (!Int32.TryParse(Environment.GetEnvironmentVariable("MonInBackoffSeconds"), out _backoffInSeconds))
throw new ArgumentNullException("Valid MonInBackoffSeconds environment varialbe not found");
_resource = _config["MonIn:resource"];
if (_resource is null) throw new ArgumentNullException("MonIn:resource not found in config");
_resource = Environment.GetEnvironmentVariable("FabApprovalWorkerServiceMonInResource") ??
throw new ArgumentNullException("FabApprovalWorkerServiceMonInResource environment variable not found");
}
public async void PostStatus(string statusName, StatusValue statusValue) {