move log housekeeping to separate function

This commit is contained in:
2022-01-21 01:41:17 +01:00
parent b734d9bcb4
commit da6df92ed1
2 changed files with 11 additions and 3 deletions

View File

@@ -659,10 +659,15 @@ func (b *BuildManager) syncWorker() {
}
wg.Wait()
err := logHK()
if err != nil {
log.Warningf("log-housekeeping failed: %v", err)
}
// fetch updates between sync runs
b.alpmMutex.Lock()
check(alpmHandle.Release())
err := setupChroot()
err = setupChroot()
for err != nil {
log.Warningf("Unable to upgrade chroot, trying again later.")
time.Sleep(time.Minute)