fix: force .mo. reload in reload

This commit is contained in:
Piotr Dec 2026-04-14 03:12:31 +02:00
parent 08972266db
commit 4b8ea49c0c
Signed by: stawros
GPG key ID: 74B18A3F0F1E99C0

View file

@ -1,5 +1,6 @@
import logging
from datetime import datetime
from pathlib import Path
from typing import Annotated
from bubus import EventBus
@ -24,11 +25,12 @@ class ReloadService:
async def on_reload(self, event: ReloadEvent):
logger.info(f"Received ReloadEvent: {event.service}")
head = self._git.get_head()
mos = Path('files/forge').glob('*.mo.*')
await self._bus.dispatch(WoodpeckerEvent(
_id=-1,
commit=head.sha,
ref=head.branch,
message=f"Manual reload of {event.service}",
started=int(datetime.now().timestamp()),
files=[f"compose/{event.service}/docker-compose.yml"]
files=[f"compose/{event.service}/docker-compose.yml"] + [str(pp) for pp in list(mos)]
))