fix(#1375): clean up pedantic warnings and re-enable -D warnings without pedantic bypass
This commit is contained in:
parent
da7f1d6c45
commit
fb726197ea
28 changed files with 109 additions and 90 deletions
|
|
@ -23,7 +23,7 @@ use std::time::{Duration, SystemTime, UNIX_EPOCH};
|
|||
|
||||
use crate::coordinator::Coordinator;
|
||||
|
||||
const VACUUM_INTERVAL: Duration = Duration::from_secs(3600);
|
||||
const VACUUM_INTERVAL: Duration = Duration::from_hours(1);
|
||||
/// Keep completed task files for 48 hours before sweeping them.
|
||||
const KEEP_SECS: i64 = 48 * 3600;
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ fn should_delete(json_path: &Path, cutoff: i64) -> bool {
|
|||
}
|
||||
let completed_at = v
|
||||
.get("completed_at")
|
||||
.and_then(|t| t.as_i64())
|
||||
.and_then(serde_json::Value::as_i64)
|
||||
.unwrap_or(i64::MAX);
|
||||
completed_at < cutoff
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue