Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEST-489: Reload every tenant in UpdateShellRequestUrl maintenance #97

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Piedone marked this conversation as resolved.
Show resolved Hide resolved
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