fix: fix Aur packages installation
This commit is contained in:
@ -265,6 +265,18 @@ class Daemon:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
async def _aur_pending_loop(self):
|
||||
"""Réessaie l'installation AUR toutes les 5 min si des paquets sont en attente.
|
||||
|
||||
Nécessaire car le cycle AUR au démarrage échoue souvent (aucun utilisateur
|
||||
connecté), et le prochain cycle horaire est trop tardif.
|
||||
"""
|
||||
while self._running:
|
||||
await asyncio.sleep(300)
|
||||
if self._state.get("pending_aur"):
|
||||
logger.info("Paquets AUR en attente — nouvelle tentative d'installation")
|
||||
await self.aur_cycle()
|
||||
|
||||
async def run(self):
|
||||
if SOCKET_PATH.exists():
|
||||
SOCKET_PATH.unlink()
|
||||
@ -290,6 +302,8 @@ class Daemon:
|
||||
await asyncio.sleep(FIRST_RUN_DELAY_SECONDS)
|
||||
await self.update_cycle()
|
||||
|
||||
asyncio.create_task(self._aur_pending_loop())
|
||||
|
||||
while self._running:
|
||||
await asyncio.sleep(UPDATE_INTERVAL_SECONDS)
|
||||
await self.update_cycle()
|
||||
|
||||
Reference in New Issue
Block a user