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 => {
|
||||
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;
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue