fix: log ephemeral events after send

This commit is contained in:
Greg Heartsfield 2022-11-04 07:55:38 -05:00
parent 8ecce3f566
commit 14b5a51e3a

View File

@ -216,13 +216,13 @@ pub async fn db_writer(
// TODO: cache recent list of authors to remove a DB call. // TODO: cache recent list of authors to remove a DB call.
let start = Instant::now(); let start = Instant::now();
if event.kind >= 20000 && event.kind < 30000 { if event.kind >= 20000 && event.kind < 30000 {
bcast_tx.send(event.clone()).ok();
info!( info!(
"published ephemeral event {:?} from {:?} in {:?}", "published ephemeral event {:?} from {:?} in {:?}",
event.get_event_id_prefix(), event.get_event_id_prefix(),
event.get_author_prefix(), event.get_author_prefix(),
start.elapsed() start.elapsed()
); );
bcast_tx.send(event.clone()).ok();
event_write = true event_write = true
} else { } else {
match write_event(&mut pool.get()?, &event) { match write_event(&mut pool.get()?, &event) {