From 012bf0593df7bf93afb73db5c87dd8ccc36e851f Mon Sep 17 00:00:00 2001 From: Max Audron Date: Tue, 7 Jun 2022 12:28:18 +0200 Subject: move to mostly sync architecture the git repository struct is not sharable between threads, thus go single threaded for now and only call onto the tokio runtime for lookups towards gitlab. --- src/forge/gitlab/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/forge') diff --git a/src/forge/gitlab/mod.rs b/src/forge/gitlab/mod.rs index fac60b7..dec3b49 100644 --- a/src/forge/gitlab/mod.rs +++ b/src/forge/gitlab/mod.rs @@ -1,5 +1,4 @@ use anyhow::Result; -use gitlab::AsyncGitlab; use graphql_client::GraphQLQuery; @@ -7,10 +6,11 @@ pub mod config; #[derive(Clone, Debug)] pub struct Gitlab { - client: AsyncGitlab, + client: gitlab::AsyncGitlab, } impl Gitlab { + #[tracing::instrument(level = "trace")] pub async fn new(host: &str, token: &str, tls: bool) -> Result { let mut gitlab = gitlab::GitlabBuilder::new(host, token); @@ -23,6 +23,7 @@ impl Gitlab { Ok(Gitlab { client: gitlab }) } + #[tracing::instrument(level = "trace")] pub async fn from_config(forge: &config::Gitlab) -> Result { Gitlab::new(&forge.host, &forge.token, forge.tls).await } -- cgit v1.2.3