fix: repr WoodpeckerEvent?!
This commit is contained in:
parent
7234560d16
commit
239e51f0f8
1 changed files with 16 additions and 13 deletions
|
|
@ -23,16 +23,19 @@ class ReloadService:
|
|||
logger.info("ReloadService initialized.")
|
||||
|
||||
async def on_reload(self, event: ReloadEvent):
|
||||
logger.info(f"Received ReloadEvent: {event.service}")
|
||||
head = self._git.get_head()
|
||||
mos = Path(f"files/{event.service}").glob('*.mo.*')
|
||||
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)]
|
||||
)
|
||||
logger.trace(f"Sending <WoodpeckerEvent _id={we._id} commit={we.commit} ref={we.ref} message={we.message} started={we.started} files={we.files}")
|
||||
await self._bus.dispatch(we)
|
||||
try:
|
||||
logger.info(f"Received ReloadEvent: {event.service}")
|
||||
head = self._git.get_head()
|
||||
mos = Path(f"files/{event.service}").glob('*.mo.*')
|
||||
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)]
|
||||
)
|
||||
logger.debug(f"Sending <WoodpeckerEvent _id={we._id} commit={we.commit} ref={we.ref} message={we.message} started={we.started} files={we.files}")
|
||||
await self._bus.dispatch(we)
|
||||
except Exception as e:
|
||||
logger.error(f"Reload error: {e}", exc_info=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue