-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
One event class and Event Broker config extension #60
Conversation
…using for asynchronous communication between services: BaseEvent and Event. After implementing them, it turned out that they are very similar and it is possible to use only one instead. The biggest benefit is simplicity as having one class is always easier to understand/use.
return False | ||
|
||
def __repr__(self) -> str: | ||
return f"Event(type='{self.type}', data={self.data})" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In most events, self.data
won't be small - I don't know if putting it into the representation makes sense 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was there out of the box in the original data class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But that does not mean it was good, dataclass puts there everything by default, I think.
If we need to present data, still, we can do this but I would like to keep representation clearer 😉
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
No description provided.