forked from kemitix/git-next
feat(repo/status): reschedule ValidateRepo when checks are Pending
Closes kemitix/git-next#48
This commit is contained in:
parent
24cb485410
commit
b398ac3fd3
1 changed files with 3 additions and 1 deletions
|
@ -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");
|
||||||
|
|
Loading…
Reference in a new issue