tracks lexicons and how many times they appeared on the jetstream

feat(server): convert microsecond timestamps to seconds

ptr.pet 5cc9c68c 861c4a13

verified
Changed files
+6 -1
server
src
+6 -1
server/src/main.rs
···
to.ingest_events(hits.map(|hit| {
count += 1;
let hit = hit.expect("cant decode hit");
+
let mut timestamp = hit.timestamp;
+
// check if timestamp is microseconds, convert to seconds if it is
+
if timestamp > 10_000_000_000 {
+
timestamp /= 1_000_000;
+
}
EventRecord {
nsid: nsid.to_smolstr(),
-
timestamp: hit.timestamp,
+
timestamp,
deleted: hit.deser().unwrap().deleted,
}
}))