mirror of
https://github.com/Noratrieb/does-it-build.git
synced 2026-01-14 10:25:01 +01:00
Make it more robust
This commit is contained in:
parent
cc4d90e748
commit
7f4c69e51f
2 changed files with 34 additions and 28 deletions
11
src/build.rs
11
src/build.rs
|
|
@ -38,7 +38,14 @@ impl Display for Toolchain {
|
|||
pub async fn background_builder(db: Db) -> Result<()> {
|
||||
let mut nightly_cache = NightlyCache::default();
|
||||
loop {
|
||||
let nightlies = Nightlies::fetch(&mut nightly_cache)
|
||||
if let Err(err) = background_builder_inner(&db, &mut nightly_cache).await {
|
||||
error!("error in background builder: {err}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async fn background_builder_inner(db: &Db, nightly_cache: &mut NightlyCache) -> Result<()> {
|
||||
let nightlies = Nightlies::fetch(nightly_cache)
|
||||
.await
|
||||
.wrap_err("fetching nightlies")?;
|
||||
let already_finished = db
|
||||
|
|
@ -65,7 +72,7 @@ pub async fn background_builder(db: Db) -> Result<()> {
|
|||
tokio::time::sleep(Duration::from_secs(1 * 60 * 60)).await;
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn targets_for_toolchain(toolchain: &Toolchain) -> Result<Vec<String>> {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ impl Nightlies {
|
|||
// We probe for their existence.
|
||||
let latest = all
|
||||
.last()
|
||||
.ok_or_eyre("did not find any nightlies in manifets.txt")?;
|
||||
.ok_or_eyre("did not find any nightlies in manifests.txt")?;
|
||||
|
||||
for nightly in guess_more_recent_nightlies(&latest)? {
|
||||
if nightly_exists(&nightly, cache)
|
||||
|
|
@ -62,7 +62,6 @@ impl Nightlies {
|
|||
&self,
|
||||
already_finished: &[FinishedNightly],
|
||||
) -> Option<(String, BuildMode)> {
|
||||
dbg!(&self.all[..20]);
|
||||
let already_finished = HashSet::<_, RandomState>::from_iter(already_finished.iter());
|
||||
|
||||
self.all
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue