mirror of
https://github.com/zrepl/zrepl.git
synced 2024-12-23 07:28:57 +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")
|
return nil, errors.Wrap(err, "cannot build pruning rules")
|
||||||
}
|
}
|
||||||
considerSnapAtCursorReplicated := false
|
considerSnapAtCursorReplicated := false
|
||||||
|
for _, r := range in.Keep {
|
||||||
|
knr, ok := r.Ret.(*config.PruneKeepNotReplicated)
|
||||||
|
if !ok {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
considerSnapAtCursorReplicated = considerSnapAtCursorReplicated || !knr.KeepSnapshotAtCursor
|
||||||
|
}
|
||||||
f := &SinglePrunerFactory{
|
f := &SinglePrunerFactory{
|
||||||
keepRules: rules,
|
keepRules: rules,
|
||||||
retryWait: envconst.Duration("ZREPL_PRUNER_RETRY_INTERVAL", 10 * time.Second),
|
retryWait: envconst.Duration("ZREPL_PRUNER_RETRY_INTERVAL", 10 * time.Second),
|
||||||
|
Loading…
Reference in New Issue
Block a user