From e85a2b7467cd547e0c910e8ed266d281911d0e69 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 22 Sep 2021 16:39:30 -0400 Subject: [PATCH] Fix tests --- src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index e92e2d956..4e827d72a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -43,10 +43,6 @@ async fn main() -> Result<(), LemmyError> { .build(manager) .unwrap_or_else(|_| panic!("Error connecting to {}", db_url)); - // Initialize the secrets - let conn = pool.get()?; - let secret = Secret::init(&conn).expect("Couldn't initialize secrets."); - // Run the migrations from code let protocol_and_hostname = settings.get_protocol_and_hostname(); blocking(&pool, move |conn| { @@ -67,6 +63,10 @@ async fn main() -> Result<(), LemmyError> { rate_limit_config: settings.rate_limit.to_owned().unwrap_or_default(), }; + // Initialize the secrets + let conn = pool.get()?; + let secret = Secret::init(&conn).expect("Couldn't initialize secrets."); + println!( "Starting http server at {}:{}", settings.bind, settings.port