From 23c3f885c34c15084b06b15a4a8b37f4013d39d9 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Mon, 7 Jun 2021 02:11:19 +0200 Subject: main: Not multi-threaded Looks like the work doesn't happen on multiple threads. All of the tasks printed the same thread ID. Need to do some more work to get this working properly, it seems. --- src/main.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 0d4938d..4812223 100644 --- a/src/main.rs +++ b/src/main.rs @@ -123,6 +123,7 @@ fn run() -> anyhow::Result<()> { let join = tokio::spawn(async move { let mut db = db.lock().await; + dbg!("processing on", std::thread::current().id()); process_repo( &repo, @@ -165,6 +166,7 @@ async fn process_repo( base_cgitrc: Option, max_repo_size_bytes: Option, ) -> anyhow::Result<()> { + return anyhow::bail!("test"); if let Some(max_repo_size_bytes) = max_repo_size_bytes { if is_repo_oversize(repo.size, max_repo_size_bytes) { return Ok(()); -- cgit v1.2.3