fix: repr WoodpeckerEvent
This commit is contained in:
parent
9a8bc44e09
commit
7fa243a8d4
2 changed files with 5 additions and 2 deletions
|
|
@ -26,7 +26,7 @@ class ReloadService:
|
|||
logger.info(f"Received ReloadEvent: {event.service}")
|
||||
head = self._git.get_head()
|
||||
mos = Path(f"files/{event.service}").glob('*.mo.*')
|
||||
event = WoodpeckerEvent(
|
||||
we = WoodpeckerEvent(
|
||||
_id=-1,
|
||||
commit=head.sha,
|
||||
ref=head.branch,
|
||||
|
|
@ -34,5 +34,5 @@ class ReloadService:
|
|||
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: {event}")
|
||||
logger.trace(f"Sending WoodpeckerEvent: {we}")
|
||||
await self._bus.dispatch(event)
|
||||
|
|
|
|||
|
|
@ -11,5 +11,8 @@ class WoodpeckerEvent(BaseEvent):
|
|||
started: int
|
||||
files: List[str]
|
||||
|
||||
def __repr__(self):
|
||||
return f"<WoodpeckerEvent _id={self._id} commit={self.commit} ref={self.ref} message={self.message} started={self.started} files={self.files}>"
|
||||
|
||||
class ReloadEvent(BaseEvent):
|
||||
service: str
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue