tracks lexicons and how many times they appeared on the jetstream

fix(server): actually sync on migrate lol

ptr.pet 4e1f68a4 ebeab2a7

verified
Changed files
+2 -1
server
src
+2 -1
server/src/main.rs
···
let mut total_count = 0_u64;
for nsid in from.get_nsids() {
tracing::info!("migrating {} ...", nsid.deref());
-
for hit in from.get_hits(&nsid, ..).expect("cant read hits") {
let (timestamp, data) = hit.expect("cant read event");
to.record_event(EventRecord {
nsid: nsid.to_smolstr(),
···
}
}
tracing::info!("migrated {total_count} events!");
}
···
let mut total_count = 0_u64;
for nsid in from.get_nsids() {
tracing::info!("migrating {} ...", nsid.deref());
+
for hit in from.get_hits(&nsid, ..) {
let (timestamp, data) = hit.expect("cant read event");
to.record_event(EventRecord {
nsid: nsid.to_smolstr(),
···
}
}
+
to.sync(true).expect("cant sync");
tracing::info!("migrated {total_count} events!");
}