mirror of
https://github.com/scsibug/nostr-rs-relay.git
synced 2024-11-09 21:29:06 -05:00
fix: log ephemeral events after send
This commit is contained in:
parent
8ecce3f566
commit
14b5a51e3a
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user