-
Notifications
You must be signed in to change notification settings - Fork 32
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
Scheduling "retention" reads policy from "forget" #23
Comments
(I'm happy to provide a PR if this is accepted) |
hmmm yeah, I suppose being able to schedule My intention was to keep only one configuration when running with a backup, or when running separately. But thinking about it, if you need to run it separately it means you probably need a different configuration anyway. |
Yes, that’s also how I see it. Running along with backup is where retention makes perfectly sense. And in most cases that’s where it should run. Main point for me is to run prune separately. But for the remaining cases where forget may need to be scheduled, it likely would need its own config as you also mentioned. So instead of fixing the bug it might be better to adjust the logic as proposed above. |
I agree we can add a schedule of the |
Yes that makes sense |
Hi @creativeprojects , a PR that adds support to schedule forget was just added. Since fixing the reported problem would break setups of existing users, I'd deprecate scheduling |
0.11.0 includes all changes |
Finding
At the moment the following configuration schedules
forget
without any effect (at least withsystemd
):The reason is that
retention
isn't a command but a configuration section that is mapped toforget
. The schedule invokesforget
which reads the retention config from theforget
config section (that is what I'd expect whenforget
is scheduled).With the following workaround, it is possible to schedule
forget
(forget itself cannot be scheduled directly):Suggestion
The idea to have
retention
policies defined withbackup
is great since it allows to have separate retention settings per tag & path. When called before or after backup and withoutprune
(for large repos) it is also a fast operation. So this should not be changed, it is good as it is.However, instead of artificially mapping
retention
to a scheduledforget
command, I'd suggest to allow schedulingforget
directly and remove the option to scheduleretention
(it is broken anyway).See also #22 , when prune can be scheduled separately, then there are less use cases where scheduling
forget
(with or without prune) really makes sense, still I'd allow it as there may be cases where it is needed.The text was updated successfully, but these errors were encountered: