refactor: rename set_filter_from to since

This commit is contained in:
xeruf 2024-11-20 23:23:15 +01:00
parent 1f13c45831
commit 20fc8f9a3a
2 changed files with 3 additions and 3 deletions

View file

@ -457,7 +457,7 @@ async fn main() -> Result<()> {
None => {
let today = Timestamp::now() - 80_000;
info!("Filtering for tasks from the last 22 hours");
if !tasks.set_filter_from(today) {
if !tasks.set_filter_since(today) {
continue 'repl;
}
}
@ -475,7 +475,7 @@ async fn main() -> Result<()> {
.or_else(|| parse_date(arg).map(|utc| utc.with_timezone(&Local)))
.map(|time| {
info!("Filtering for tasks from {}", format_datetime_relative(time));
tasks.set_filter_from(time.to_timestamp())
tasks.set_filter_since(time.to_timestamp())
})
.is_none_or(|b| !b) {
continue 'repl;

View file

@ -673,7 +673,7 @@ impl TasksRelay {
self.pubkey = Some(key)
}
pub(crate) fn set_filter_from(&mut self, time: Timestamp) -> bool {
pub(crate) fn set_filter_since(&mut self, time: Timestamp) -> bool {
// TODO filter at both ends
self.set_filter(|t| t.last_state_update() > time)
}