feat: archive forge data if it doesn't exist
This commit is contained in:
parent
8d222d185b
commit
7e0c235275
1 changed files with 9 additions and 1 deletions
|
@ -41,8 +41,16 @@ impl Ctx {
|
|||
forge_type: gitea.forge_type(),
|
||||
};
|
||||
db.create_forge_isntance(&msg).await.unwrap();
|
||||
} else {
|
||||
if !federate.forge_exists(hostname).await.unwrap() {
|
||||
let forge = db.get_forge(hostname).await.unwrap();
|
||||
let msg = CreateForge {
|
||||
hostname,
|
||||
forge_type: forge.forge_type,
|
||||
};
|
||||
federate.create_forge_isntance(&msg).await.unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
loop {
|
||||
info!("[crawl][{hostname}] Crawling. page: {page}");
|
||||
|
|
Loading…
Reference in a new issue