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
Matomo archive processing service #47747
Matomo archive processing service #47747
Conversation
0fd8a4a
to
94639df
Compare
94639df
to
6354eae
Compare
b9e7621
to
b25de20
Compare
b25de20
to
82a30ef
Compare
Seems like I had a bad English day. o.0 @c0bw3b thank you for not letting that slip through! 👍 |
systemd.timers."matomo-archive-processing" = mkIf cfg.periodicArchiveProcessing { | ||
description = "Automatically archive Matomo reports every hour"; | ||
|
||
wantedBy = [ "timers.target" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I always thought a partOf = [ "matomo-archive-processing.service" ];
was needed too, but I guess not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not for the basic connection of timer and service, if there is a service of the same name as the timer, it will activate it automatically.
For each timer file, a matching unit file must exist, describing the unit to activate when the timer elapses. By default, a service by the same name as the timer (except for the suffix) is activated.
man systemd.timer
I can only guess that a partOf
is used when a manual activation of the service should count as an activation in the timer's schedule or something like that. But as the service is fine with being startet at arbitrary intervals, that's fine in this case. Is there any other reason for partOf
with timers? 🤔
7f7a5bc
to
82436f8
Compare
to make it consistent with other NixOS systemd services and `matomo-archive-processing.service`. Also, consistently spell Matomo with capital M.
82436f8
to
959ba6f
Compare
Just noticed this is still lying around, |
All good, thanks for the PR :) |
@infinisil thanks for your time! :) |
Automatically sets up periodic archiving, allowing to disable browser-based archive processing.
Depends on merging #47691 first.
Motivation for this change
Reliable archive processing allows to regularily delete old visitor logs wile keeping the aggregated reports, which is helpful when implementing GDPR while stil having some history. Also reduces your database size.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)