Skip to content

Commit

Permalink
log panic
Browse files Browse the repository at this point in the history
  • Loading branch information
Dav1dde committed Oct 30, 2024
1 parent 5c8992d commit 15f8a74
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions relay-server/src/services/buffer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ impl EnvelopeBufferService {
status = "system_ready"
);

relay_log::trace!("sleep");
relay_log::trace!("sleep {:?}", self.sleep);
if self.sleep > Duration::ZERO {
tokio::time::sleep(self.sleep).await;
}
Expand Down Expand Up @@ -412,6 +412,8 @@ impl Service for EnvelopeBufferService {
used_capacity as u64
);

dbg!(shutdown.get());

let mut sleep = Duration::MAX;
tokio::select! {
// NOTE: we do not select a bias here.
Expand Down Expand Up @@ -706,7 +708,10 @@ mod tests {
let legacy::DequeuedEnvelope(envelope) =
tokio::time::timeout(std::time::Duration::from_secs(3), envelopes_rx.recv())
.await
.unwrap()
.unwrap_or_else(|_| {
relay_log::warn!("PANIC");
panic!("timeout elapsed");
})
.unwrap();

addr.send(EnvelopeBuffer::NotReady(project_key, envelope));
Expand Down

0 comments on commit 15f8a74

Please sign in to comment.