Skip to content

Commit 788b70d

Browse files
committed
pr comments
1 parent 5d0063e commit 788b70d

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

apps/labrinth/src/database/redis.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ impl RedisPool {
128128
Ok(())
129129
}
130130

131+
#[tracing::instrument(skip(self))]
131132
pub async fn connect(&self) -> Result<RedisConnection, DatabaseError> {
132133
Ok(RedisConnection {
133134
connection: self.pool.get().await?,

apps/labrinth/src/main.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -270,22 +270,6 @@ async fn app() -> std::io::Result<()> {
270270
.config(utoipa_swagger_ui::Config::default().try_it_out_enabled(true))
271271
.url("/docs/openapi.json", ApiDoc::openapi().merge_from(api)))
272272
.into_app()
273-
.configure(|cfg| {
274-
cfg.route("/testing-error-1", actix_web::web::get().to(|| async {
275-
async {
276-
tokio::time::sleep(std::time::Duration::from_millis(500)).await;
277-
}.instrument(tracing::info_span!("doing a DB op")).await;
278-
279-
async {
280-
tokio::time::sleep(std::time::Duration::from_millis(250)).await;
281-
}.instrument(tracing::info_span!("doing a redis op")).await;
282-
283-
let err = sqlx::Error::BeginFailed;
284-
let err = eyre::eyre!(err).wrap_err("failed to begin transaction");
285-
let err = eyre::eyre!(err).wrap_err("(testing) trying to get a span to appear 2");
286-
Err::<(), _>(labrinth::routes::ApiError::Internal(err))
287-
}));
288-
})
289273
.configure(|cfg| app_config(cfg, labrinth_config.clone()))
290274
})
291275
.bind(dotenvy::var("BIND_ADDR").unwrap())?

0 commit comments

Comments
 (0)