feat(repo/status): reschedule ValidateRepo when checks are Pending

Closes kemitix/git-next#48
This commit is contained in:
Paul Campbell 2024-04-14 18:33:01 +01:00
parent 24cb485410
commit b398ac3fd3

View file

@ -3,6 +3,7 @@ use gix::trace::warn;
use tracing::info; use tracing::info;
use crate::server::{ use crate::server::{
actors::repo::ValidateRepo,
config::{self, ForgeType}, config::{self, ForgeType},
forge, forge,
}; };
@ -32,7 +33,8 @@ pub async fn check_next(
addr.do_send(AdvanceMainTo(next)); addr.do_send(AdvanceMainTo(next));
} }
Status::Pending => { Status::Pending => {
// TODO: (#48) reschedule a check after a few seconds tokio::time::sleep(tokio::time::Duration::from_secs(10)).await;
addr.do_send(ValidateRepo);
} }
Status::Fail => { Status::Fail => {
warn!("Checks have failed"); warn!("Checks have failed");