mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-19 16:58:55 +00:00
prelude: remove ratelimit logs
This commit is contained in:
parent
229e6a911f
commit
e46cce3cb6
2 changed files with 1 additions and 4 deletions
|
@ -7,8 +7,8 @@ pub mod announcer;
|
|||
pub mod args;
|
||||
pub mod hook;
|
||||
pub mod pagination;
|
||||
pub mod setup;
|
||||
pub mod ratelimit;
|
||||
pub mod setup;
|
||||
|
||||
pub use announcer::{Announcer, AnnouncerHandler};
|
||||
pub use args::{Duration, UsernameArg};
|
||||
|
|
|
@ -40,7 +40,6 @@ impl<T> Ratelimit<T> {
|
|||
/// The clock counts from the moment the ref is dropped.
|
||||
pub async fn borrow<'a>(&'a self) -> Result<impl Deref<Target = T> + 'a> {
|
||||
self.recv.recv_async().await?;
|
||||
eprintln!("lock accquired! {} left", self.recv.len());
|
||||
Ok(RatelimitGuard {
|
||||
inner: &self.inner,
|
||||
send: &self.send,
|
||||
|
@ -62,9 +61,7 @@ impl<'a, T> Drop for RatelimitGuard<'a, T> {
|
|||
let wait_time = self.wait_time.clone();
|
||||
tokio::spawn(async move {
|
||||
tokio::time::delay_for(wait_time).await;
|
||||
eprintln!("lock lifting!");
|
||||
send.send_async(()).await.ok();
|
||||
eprintln!("lock lifted!");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue