"lemmy_utils",
"lemmy_websocket",
"once_cell",
- "parking_lot 0.12.0",
"reqwest",
"reqwest-middleware",
"serde",
"lemmy_websocket",
"opentelemetry 0.17.0",
"opentelemetry-otlp",
- "parking_lot 0.12.0",
"reqwest",
"reqwest-middleware",
"reqwest-retry",
reqwest-tracing = "0.2.1"
clokwerk = "0.3.5"
doku = "0.11.0"
-parking_lot = "0.12.0"
reqwest-retry = "0.1.5"
console-subscriber = { version = "0.1.3", optional = true }
opentelemetry = { version = "0.17.0", features = ["rt-tokio"], optional = true }
reqwest = { version = "0.11.10", features = ["json"] }
html2md = "0.2.13"
once_cell = "1.10.0"
-parking_lot = "0.12.0"
[dev-dependencies]
serial_test = "0.6.0"
settings::SETTINGS,
};
use lemmy_websocket::{chat_server::ChatServer, LemmyContext};
- use parking_lot::Mutex;
use reqwest::{Client, Request, Response};
use reqwest_middleware::{ClientBuilder, Middleware, Next};
- use std::sync::Arc;
+ use std::sync::{Arc, Mutex};
use task_local_extensions::Extensions;
struct BlockedMiddleware;
HttpResponse,
};
use futures::future::{ok, Ready};
-use parking_lot::Mutex;
use rate_limiter::{RateLimitType, RateLimiter};
use std::{
future::Future,
pin::Pin,
rc::Rc,
- sync::Arc,
+ sync::{Arc, Mutex},
task::{Context, Poll},
};
RateLimitType::Comment => (rate_limit.comment, rate_limit.comment_per_second),
RateLimitType::Search => (rate_limit.search, rate_limit.search_per_second),
};
- let mut limiter = self.rate_limiter.lock();
+ let mut limiter = self.rate_limiter.lock().expect("mutex poison error");
limiter.check_rate_limit_full(self.type_, &ip_addr, kind, interval)
}
settings::{structs::Settings, SETTINGS},
};
use lemmy_websocket::{chat_server::ChatServer, LemmyContext};
-use parking_lot::Mutex;
use reqwest::Client;
use reqwest_middleware::ClientBuilder;
use reqwest_retry::{policies::ExponentialBackoff, RetryTransientMiddleware};
use reqwest_tracing::TracingMiddleware;
-use std::{env, sync::Arc, thread, time::Duration};
+use std::{
+ env,
+ sync::{Arc, Mutex},
+ thread,
+ time::Duration,
+};
use tracing_actix_web::TracingLogger;
embed_migrations!();