fix: repr WoodpeckerEvent?!?!

This commit is contained in:
Piotr Dec 2026-04-14 03:32:50 +02:00
parent d5f94e26c6
commit 88aa334846
Signed by: stawros
GPG key ID: 74B18A3F0F1E99C0

View file

@ -26,14 +26,15 @@ class ReloadService:
try:
logger.info(f"Received ReloadEvent: {event.service}")
head = self._git.get_head()
mos = Path(f"files/{event.service}").glob('*.mo.*')
mos = list(Path(f"files/{event.service}").glob('*.mo.*'))
logger.debug(f"Found {len(mos)} .mo files")
we = 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"] + [str(pp) for pp in list(mos)]
files=[f"compose/{event.service}/docker-compose.yml"] + [str(pp) for pp in mos]
)
logger.debug(f"Sending <WoodpeckerEvent commit={we.commit} ref={we.ref} message={we.message} started={we.started} files={we.files}")
await self._bus.dispatch(we)