mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-07-08 10:42:21 +02:00
chore: simplify maintenance skip condition
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
This commit is contained in:
parent
0399754ec8
commit
66939e6545
@ -91,8 +91,8 @@ func (c *CatalogMaintenanceRunnable) cycle(ctx context.Context) (time.Duration,
|
|||||||
}
|
}
|
||||||
|
|
||||||
enabledPlugins := cnpgv1.GetPluginConfigurationEnabledPluginNames(cluster.Spec.Plugins)
|
enabledPlugins := cnpgv1.GetPluginConfigurationEnabledPluginNames(cluster.Spec.Plugins)
|
||||||
if enabledForBackups := slices.Contains(enabledPlugins, metadata.PluginName); !enabledForBackups {
|
if !slices.Contains(enabledPlugins, metadata.PluginName) {
|
||||||
contextLogger.Debug("Skipping maintenance cycle: plugin is configured for restore only")
|
contextLogger.Debug("Skipping maintenance cycle: plugin is not enabled for backups")
|
||||||
return 0, nil
|
return 0, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user