Skip to content

Commit

Permalink
Using IShellHost to also reload tenant after saving new shellsettings
Browse files Browse the repository at this point in the history
  • Loading branch information
wAsnk committed Oct 25, 2023
1 parent aed6627 commit b474282
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@ public class UpdateShellRequestUrlsMaintenanceProvider : MaintenanceProviderBase
private readonly ShellSettings _shellSettings;
private readonly IOptions<UpdateShellRequestUrlMaintenanceOptions> _options;
private readonly IShellSettingsManager _shellSettingsManager;
private readonly IShellHost _shellHost;

public UpdateShellRequestUrlsMaintenanceProvider(
ShellSettings shellSettings,
IOptions<UpdateShellRequestUrlMaintenanceOptions> options,
IShellSettingsManager shellSettingsManager)
IShellSettingsManager shellSettingsManager,
IShellHost shellHost)
{
_shellSettings = shellSettings;
_options = options;
_shellSettingsManager = shellSettingsManager;
_shellHost = shellHost;
}

public override Task<bool> ShouldExecuteAsync(MaintenanceTaskExecutionContext context) =>
Expand All @@ -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;
Expand Down

0 comments on commit b474282

Please sign in to comment.