1
0
Fork 0
forked from wry/wry

Add clean-logs-older-than option

This commit is contained in:
khyperia 2026-03-27 07:44:34 +01:00 committed by Julian Orth
parent 4c7d108e09
commit 880c98ecfb
17 changed files with 360 additions and 10 deletions

View file

@ -150,7 +150,7 @@ use {
ops::{Deref, DerefMut},
rc::{Rc, Weak},
sync::Arc,
time::Duration,
time::{Duration, SystemTime},
},
thiserror::Error,
uapi::{OwnedFd, c},
@ -305,6 +305,7 @@ pub struct State {
pub egg_state: EggState,
pub control_centers: ControlCenters,
pub virtual_outputs: VirtualOutputs,
pub clean_logs_older_than: Cell<Option<SystemTime>>,
}
// impl Drop for State {
@ -1760,6 +1761,14 @@ impl State {
}
}
pub fn perform_clean_logs_older_than(&self) {
if let Some(time) = self.clean_logs_older_than.get()
&& let Some(logger) = &self.logger
{
logger.clean_logs_older_than(time);
}
}
fn colors_changed(&self) {
struct V;
impl NodeVisitorBase for V {