fix: verbosity in ReloadService

This commit is contained in:
Piotr Dec 2026-04-14 03:16:26 +02:00
parent 4b8ea49c0c
commit 9a8bc44e09
Signed by: stawros
GPG key ID: 74B18A3F0F1E99C0

View file

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