refactor: rename set_filter_from to since
This commit is contained in:
parent
1f13c45831
commit
20fc8f9a3a
2 changed files with 3 additions and 3 deletions
|
@ -457,7 +457,7 @@ async fn main() -> Result<()> {
|
||||||
None => {
|
None => {
|
||||||
let today = Timestamp::now() - 80_000;
|
let today = Timestamp::now() - 80_000;
|
||||||
info!("Filtering for tasks from the last 22 hours");
|
info!("Filtering for tasks from the last 22 hours");
|
||||||
if !tasks.set_filter_from(today) {
|
if !tasks.set_filter_since(today) {
|
||||||
continue 'repl;
|
continue 'repl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -475,7 +475,7 @@ async fn main() -> Result<()> {
|
||||||
.or_else(|| parse_date(arg).map(|utc| utc.with_timezone(&Local)))
|
.or_else(|| parse_date(arg).map(|utc| utc.with_timezone(&Local)))
|
||||||
.map(|time| {
|
.map(|time| {
|
||||||
info!("Filtering for tasks from {}", format_datetime_relative(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) {
|
.is_none_or(|b| !b) {
|
||||||
continue 'repl;
|
continue 'repl;
|
||||||
|
|
|
@ -673,7 +673,7 @@ impl TasksRelay {
|
||||||
self.pubkey = Some(key)
|
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
|
// TODO filter at both ends
|
||||||
self.set_filter(|t| t.last_state_update() > time)
|
self.set_filter(|t| t.last_state_update() > time)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue