fix(gateway): log close code, correctly set latency, don't spam redis error on identify

This commit is contained in:
alyssa 2024-12-26 19:18:46 +00:00
parent d1b617f6be
commit 88e136d22a
5 changed files with 91 additions and 48 deletions

View file

@ -10,8 +10,6 @@ use tokio::sync::oneshot;
use tracing::{error, info};
use twilight_gateway::queue::Queue;
use libpk::util::redis::RedisErrorExt;
pub fn new(redis: RedisPool) -> RedisQueue {
RedisQueue {
redis,
@ -69,8 +67,7 @@ async fn request_inner(redis: RedisPool, concurrency: u32, shard_id: u32, tx: on
Some(SetOptions::NX),
false,
)
.await
.to_option_or_error();
.await;
match done {
Ok(Some(_)) => {
info!(shard_id, bucket, "got allowance!");