diff --git a/libs/net/services/Helpers/ApiService.cs b/libs/net/services/Helpers/ApiService.cs index 5ba9b1891f..d1adaf7681 100644 --- a/libs/net/services/Helpers/ApiService.cs +++ b/libs/net/services/Helpers/ApiService.cs @@ -210,7 +210,7 @@ public async Task HandleConcurrencyAsync(Func> callbackDelegate) public async Task GetLookupsAsync() { var response = await GetLookupsResponseAsync(); - return await GetResponseData(response); + return await GetResponseDataAsync(response); } public async Task GetLookupsResponseAsync() { @@ -290,7 +290,7 @@ public async Task GetLookupsResponseWithEtagAsync(string et public async Task?> GetSourcesAsync() { var response = await GetSourcesResponseAsync(); - return await GetResponseData?>(response); + return await GetResponseDataAsync?>(response); } public async Task GetSourcesResponseWithEtagAsync(string etag) { @@ -348,7 +348,7 @@ public async Task GetSourcesResponseAsync() public async Task?> GetIngestsAsync() { var response = await GetIngestsResponseAsync(); - return await GetResponseData?>(response); + return await GetResponseDataAsync?>(response); } public async Task GetIngestsResponseAsync() { @@ -1065,7 +1065,7 @@ public async Task AddContentToFolderAsync(long contentId, i /// Get all of the settings /// /// - public async Task GetResponseData(HttpResponseMessage response) + public async Task GetResponseDataAsync(HttpResponseMessage response) { return await this.OpenClient.DeserializeAsync(response); } @@ -1073,19 +1073,19 @@ public async Task AddContentToFolderAsync(long contentId, i { return response.Headers.FirstOrDefault(x => x.Key == "ETag").Value?.ToList().FirstOrDefault(); } - public async Task?> GetSettings() + public async Task?> GetSettingsAsync() { - var response = await GetSettingsResponse(); - return await GetResponseData?>(response); + var response = await GetSettingsResponseAsync(); + return await GetResponseDataAsync?>(response); } - public async Task GetSettingsResponse() + public async Task GetSettingsResponseAsync() { var url = this.Options.ApiUrl.Append($"services/settings"); return await RetryRequestAsync(async () => await this.OpenClient.GetAsync(url)); } - public async Task GetSettingsResponseWithEtag(string etag) + public async Task GetSettingsResponseWithEtagAsync(string etag) { var url = this.Options.ApiUrl.Append($"services/settings"); return await RetryRequestAsync(async () => await this.OpenClient.GetAsync(url, etag)); diff --git a/libs/net/services/Helpers/IApiService.cs b/libs/net/services/Helpers/IApiService.cs index 1002856687..c9835597e8 100644 --- a/libs/net/services/Helpers/IApiService.cs +++ b/libs/net/services/Helpers/IApiService.cs @@ -561,10 +561,10 @@ public Task UploadFilesToS3Async( /// Get all of the settings /// /// - Task?> GetSettings(); - Task GetSettingsResponse(); - Task GetSettingsResponseWithEtag(string etag); + Task?> GetSettingsAsync(); + Task GetSettingsResponseAsync(); + Task GetSettingsResponseWithEtagAsync(string etag); string? GetResponseEtag(HttpResponseMessage response); - Task GetResponseData(HttpResponseMessage response); + Task GetResponseDataAsync(HttpResponseMessage response); #endregion } diff --git a/services/net/content/ContentManager.cs b/services/net/content/ContentManager.cs index 00d2391e71..a1380bff8e 100644 --- a/services/net/content/ContentManager.cs +++ b/services/net/content/ContentManager.cs @@ -128,10 +128,10 @@ public override async Task RunAsync() try { // TODO: Handle e-tag. - var ingest = (await GetIngests())?.ToArray(); + var ingest = (await GetIngestsAsync())?.ToArray(); // Get settings to find any overrides. - var settings = await GetSettings(); + var settings = await GetSettingsAsync(); var topicOverride = settings?.FirstOrDefault(s => s.Name == "ContentImportTopicOverride")?.Value.Split(",", StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries) ?? Array.Empty(); var ingestTopics = ingest? .Where(i => !String.IsNullOrWhiteSpace(i.Topic) && i.ImportContent()) @@ -323,7 +323,7 @@ private string FixHTMLIssues(string? text) /// If the request failed, get the data from local memory cache. /// /// - private Task?> GetSettings() + private Task?> GetSettingsAsync() { return GetLocalCacheListAsync>(SettingsListCacheKey); } @@ -393,7 +393,7 @@ private void UpdateEtagLocalCache(string keyName, string? etag) /// private async Task GetIngestsByTopicAsync(string topic) { - return (await GetIngests())?.Where(x => x.Topic.ToUpperInvariant() == topic.ToUpperInvariant()).FirstOrDefault(); + return (await GetIngestsAsync())?.Where(x => x.Topic.ToUpperInvariant() == topic.ToUpperInvariant()).FirstOrDefault(); } /// @@ -402,7 +402,7 @@ private void UpdateEtagLocalCache(string keyName, string? etag) /// If the request failed, get the data from local memory cache. /// /// - private Task?> GetIngests() + private Task?> GetIngestsAsync() { return GetLocalCacheListAsync>(IngestServicesListCacheKey); } @@ -445,7 +445,7 @@ private void UpdateEtagLocalCache(string keyName, string? etag) response = await this.Api.GetIngestsResponseWithEtagAsync(localEtagValue); break; case SettingsListCacheKey: - response = await this.Api.GetSettingsResponseWithEtag(localEtagValue); + response = await this.Api.GetSettingsResponseWithEtagAsync(localEtagValue); break; default: break; @@ -465,7 +465,7 @@ private void UpdateEtagLocalCache(string keyName, string? etag) response = await this.Api.GetIngestsResponseAsync(); break; case SettingsListCacheKey: - response = await this.Api.GetSettingsResponse(); + response = await this.Api.GetSettingsResponseAsync(); break; default: break; @@ -473,7 +473,7 @@ private void UpdateEtagLocalCache(string keyName, string? etag) } if (response != null && response.StatusCode == System.Net.HttpStatusCode.OK) { - dataList = await this.Api.GetResponseData(response); + dataList = await this.Api.GetResponseDataAsync(response); var etag = this.Api.GetResponseEtag(response); UpdateEtagLocalCache(keyName, etag); _memoryCache.Set(keyName, dataList, TimeSpan.FromMinutes(LocalCacheExpirationMinutes));