fix: repr WoodpeckerEvent?!?!
This commit is contained in:
parent
d5f94e26c6
commit
88aa334846
1 changed files with 3 additions and 2 deletions
|
|
@ -26,14 +26,15 @@ class ReloadService:
|
||||||
try:
|
try:
|
||||||
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(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(
|
we = 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 mos]
|
||||||
)
|
)
|
||||||
logger.debug(f"Sending <WoodpeckerEvent commit={we.commit} ref={we.ref} message={we.message} started={we.started} files={we.files}")
|
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)
|
await self._bus.dispatch(we)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue