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 crate::server::{
actors::repo::ValidateRepo,
config::{self, ForgeType},
forge,
};
@ -32,7 +33,8 @@ pub async fn check_next(
addr.do_send(AdvanceMainTo(next));
}
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 => {
warn!("Checks have failed");