Skip to content

Commit

Permalink
Merge pull request #97 from Lombiq/issue/NEST-489
Browse files Browse the repository at this point in the history
NEST-489: Reload every tenant in UpdateShellRequestUrl maintenance
  • Loading branch information
Piedone authored Oct 26, 2023
2 parents aed6627 + b474282 commit 363e72e
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 363e72e

Please sign in to comment.