From 2f9b9cd10749519049d9406ed3f50b7fdea9806a Mon Sep 17 00:00:00 2001 From: Lilith River Date: Mon, 18 Mar 2024 22:41:25 -0600 Subject: [PATCH] Move MiddlewareOptionsServerBuilder --- src/Imageflow.Server/ImageflowMiddleware.cs | 1 - src/Imageflow.Server/Internal/GlobalInfoProvider.cs | 4 +--- .../Internal/MiddlewareOptionsServerBuilder.cs | 5 +---- src/Imazen.Routing/Health/CacheHealthStatus.cs | 1 + 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/Imageflow.Server/ImageflowMiddleware.cs b/src/Imageflow.Server/ImageflowMiddleware.cs index 60f8ce5..3c7c972 100644 --- a/src/Imageflow.Server/ImageflowMiddleware.cs +++ b/src/Imageflow.Server/ImageflowMiddleware.cs @@ -9,7 +9,6 @@ using Imazen.Common.Storage; using Imazen.Abstractions.BlobCache; using Imageflow.Server.Internal; -using Imageflow.Server.LegacyOptions; using Imazen.Abstractions.Blobs.LegacyProviders; using Imazen.Abstractions.DependencyInjection; using Imazen.Abstractions.Logging; diff --git a/src/Imageflow.Server/Internal/GlobalInfoProvider.cs b/src/Imageflow.Server/Internal/GlobalInfoProvider.cs index 2d9e455..4dc3c9a 100644 --- a/src/Imageflow.Server/Internal/GlobalInfoProvider.cs +++ b/src/Imageflow.Server/Internal/GlobalInfoProvider.cs @@ -1,15 +1,13 @@ using System.Reflection; using Imazen.Abstractions.DependencyInjection; using Imazen.Common.Helpers; -using Imazen.Common.Instrumentation.Support; using Imazen.Common.Instrumentation.Support.InfoAccumulators; using Imazen.Routing.Helpers; using Imazen.Routing.HttpAbstractions; -using Imazen.Routing.Serving; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; -namespace Imageflow.Server +namespace Imageflow.Server.Internal { internal class GlobalInfoProvider(IImageServerContainer serviceProvider): IInfoProvider { diff --git a/src/Imageflow.Server/Internal/MiddlewareOptionsServerBuilder.cs b/src/Imageflow.Server/Internal/MiddlewareOptionsServerBuilder.cs index a43fdae..e0258ae 100644 --- a/src/Imageflow.Server/Internal/MiddlewareOptionsServerBuilder.cs +++ b/src/Imageflow.Server/Internal/MiddlewareOptionsServerBuilder.cs @@ -1,8 +1,6 @@ -using System.ComponentModel; using System.Globalization; using System.Text; using Imageflow.Bindings; -using Imageflow.Server.Internal; using Imazen.Abstractions.BlobCache; using Imazen.Abstractions.Blobs.LegacyProviders; using Imazen.Abstractions.DependencyInjection; @@ -12,7 +10,6 @@ using Imazen.Routing.Health; using Imazen.Routing.HttpAbstractions; using Imazen.Routing.Layers; -using Imazen.Routing.Promises.Pipelines; using Imazen.Routing.Promises.Pipelines.Watermarking; using Imazen.Routing.Requests; using Imazen.Routing.Serving; @@ -20,7 +17,7 @@ using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; -namespace Imageflow.Server.LegacyOptions; +namespace Imageflow.Server.Internal; internal class MiddlewareOptionsServerBuilder( ImageServerContainer serverContainer, diff --git a/src/Imazen.Routing/Health/CacheHealthStatus.cs b/src/Imazen.Routing/Health/CacheHealthStatus.cs index 9b069de..4d5f1fa 100644 --- a/src/Imazen.Routing/Health/CacheHealthStatus.cs +++ b/src/Imazen.Routing/Health/CacheHealthStatus.cs @@ -20,6 +20,7 @@ internal class CacheHealthStatus : IHostedService, IDisposable private CacheHealthMetrics Metrics { get; init; } private static TimeSpan Timeout => TimeSpan.FromMinutes(3); + // TODO: NonOverlappingAsyncRunner is unreliable, remove or fix. private readonly NonOverlappingAsyncRunner? healthCheckTask; private IReLogger Logger { get; }