From db1d7657a7779e0a8a2b56f0a93f32f822b55cc0 Mon Sep 17 00:00:00 2001 From: realaravinth Date: Sat, 4 Jun 2022 21:30:27 +0530 Subject: [PATCH] feat: create repo file if doesn't exist --- src/spider.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/spider.rs b/src/spider.rs index fd28b8e..9d0d97f 100644 --- a/src/spider.rs +++ b/src/spider.rs @@ -95,10 +95,18 @@ impl Ctx { let msg = r.into(); db.create_repository(&msg).await.unwrap(); federate.create_repository(&msg).await.unwrap(); + } else { + if !federate + .repository_exists(&r.name, &r.owner.username, r.hostname) + .await + .unwrap() + { + let msg = r.into(); + federate.create_repository(&msg).await.unwrap(); + } } } - // sleep_fut.await.unwrap(); page += 1; } federate.tar().await.unwrap();