From e6bbda7740364719bfcba0c95fe4f5756167d469 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Tue, 27 Feb 2024 12:32:06 +0100 Subject: [PATCH] worker/environment: Remove obsolete `connection_pool` field --- src/bin/background-worker.rs | 2 -- src/tests/util/test_app.rs | 1 - src/worker/environment.rs | 2 -- 3 files changed, 5 deletions(-) diff --git a/src/bin/background-worker.rs b/src/bin/background-worker.rs index 2c83a7726c..a886f6c374 100644 --- a/src/bin/background-worker.rs +++ b/src/bin/background-worker.rs @@ -15,7 +15,6 @@ extern crate tracing; use anyhow::Context; use crates_io::cloudfront::CloudFront; -use crates_io::db::DieselPool; use crates_io::fastly::Fastly; use crates_io::storage::Storage; use crates_io::team_repo::TeamRepoImpl; @@ -96,7 +95,6 @@ fn main() -> anyhow::Result<()> { .cloudfront(cloudfront) .fastly(fastly) .storage(storage) - .connection_pool(DieselPool::new_background_worker(connection_pool.clone())) .deadpool(deadpool) .emails(emails) .team_repo(Box::new(team_repo)) diff --git a/src/tests/util/test_app.rs b/src/tests/util/test_app.rs index 6c3054abb3..f30072b4a9 100644 --- a/src/tests/util/test_app.rs +++ b/src/tests/util/test_app.rs @@ -280,7 +280,6 @@ impl TestAppBuilder { .config(app.config.clone()) .repository_config(repository_config) .storage(app.storage.clone()) - .connection_pool(app.primary_database.clone()) .deadpool(app.deadpool_primary.clone()) .emails(app.emails.clone()) .team_repo(Box::new(self.team_repo)) diff --git a/src/worker/environment.rs b/src/worker/environment.rs index d36d7bf834..4da8fe9c28 100644 --- a/src/worker/environment.rs +++ b/src/worker/environment.rs @@ -1,5 +1,4 @@ use crate::cloudfront::CloudFront; -use crate::db::DieselPool; use crate::fastly::Fastly; use crate::storage::Storage; use crate::team_repo::TeamRepo; @@ -27,7 +26,6 @@ pub struct Environment { #[builder(default)] fastly: Option, pub storage: Arc, - pub connection_pool: DieselPool, pub deadpool: DeadpoolPool, pub emails: Emails, pub team_repo: Box,