mirror of
https://github.com/zrepl/zrepl.git
synced 2024-12-22 23:20:51 +01:00
Honour PruneKeepNotReplicated.KeepSnashotAtCursor in SinglePrunerFactory
This commit is contained in:
parent
d0f898751f
commit
b79ad3ddc3
@ -108,6 +108,13 @@ func NewSinglePrunerFactory(in config.PruningLocal, promPruneSecs *prometheus.Hi
|
||||
return nil, errors.Wrap(err, "cannot build pruning rules")
|
||||
}
|
||||
considerSnapAtCursorReplicated := false
|
||||
for _, r := range in.Keep {
|
||||
knr, ok := r.Ret.(*config.PruneKeepNotReplicated)
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
considerSnapAtCursorReplicated = considerSnapAtCursorReplicated || !knr.KeepSnapshotAtCursor
|
||||
}
|
||||
f := &SinglePrunerFactory{
|
||||
keepRules: rules,
|
||||
retryWait: envconst.Duration("ZREPL_PRUNER_RETRY_INTERVAL", 10 * time.Second),
|
||||
|
Loading…
Reference in New Issue
Block a user