From b47428298c633b47c4e780008e8368d24472f1b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20N=C3=A9meth?= Date: Wed, 25 Oct 2023 13:19:24 +0200 Subject: [PATCH] Using IShellHost to also reload tenant after saving new shellsettings --- .../UpdateShellRequestUrlsMaintenanceProvider.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Lombiq.Hosting.Tenants.Maintenance/Maintenance/UpdateShellRequestUrl/UpdateShellRequestUrlsMaintenanceProvider.cs b/Lombiq.Hosting.Tenants.Maintenance/Maintenance/UpdateShellRequestUrl/UpdateShellRequestUrlsMaintenanceProvider.cs index 503db90a..6d7759c5 100644 --- a/Lombiq.Hosting.Tenants.Maintenance/Maintenance/UpdateShellRequestUrl/UpdateShellRequestUrlsMaintenanceProvider.cs +++ b/Lombiq.Hosting.Tenants.Maintenance/Maintenance/UpdateShellRequestUrl/UpdateShellRequestUrlsMaintenanceProvider.cs @@ -13,15 +13,18 @@ public class UpdateShellRequestUrlsMaintenanceProvider : MaintenanceProviderBase private readonly ShellSettings _shellSettings; private readonly IOptions _options; private readonly IShellSettingsManager _shellSettingsManager; + private readonly IShellHost _shellHost; public UpdateShellRequestUrlsMaintenanceProvider( ShellSettings shellSettings, IOptions options, - IShellSettingsManager shellSettingsManager) + IShellSettingsManager shellSettingsManager, + IShellHost shellHost) { _shellSettings = shellSettings; _options = options; _shellSettingsManager = shellSettingsManager; + _shellHost = shellHost; } public override Task ShouldExecuteAsync(MaintenanceTaskExecutionContext context) => @@ -43,7 +46,7 @@ public override async Task ExecuteAsync(MaintenanceTaskExecutionContext context) _options.Value.RequestUrlPrefix, shellSettings); - await _shellSettingsManager.SaveSettingsAsync(shellSettings); + await _shellHost.UpdateShellSettingsAsync(shellSettings); } context.ReloadShellAfterMaintenanceCompletion = true;