-
Notifications
You must be signed in to change notification settings - Fork 5
LITE-19830 add extra metadata to logging extras #23
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
Conversation
800f7ce to
a47effe
Compare
connect/eaas/dataclasses.py
Outdated
| return dataclasses.asdict(self) | ||
|
|
||
| @classmethod | ||
| def from_json(cls, 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.
as we discussed, better from_dict and to_dict
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.
thanks!
a47effe to
687b1e1
Compare
connect/eaas/dataclasses.py
Outdated
| return dataclasses.asdict(self) | ||
|
|
||
| @classmethod | ||
| def from_dict(cls, 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.
Honestly for me dataclasses are something about the type and structure. That's why I don't think it is needed for some methods here. Especially if you need to copy it across all dataclasses. Why not to use existing dataclasses.asdict() and implement one like fromdict(cls, 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.
Done!
connect/eaas/manager.py
Outdated
| Wait for a background task to be completed and than uild the task result message. | ||
| """ | ||
| result_message = TaskPayload(**task_data.to_json()) | ||
| result_message = TaskPayload(**task_data.to_dict()) |
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.
Not sure, but looks like for copying the instances there is a specific method - link
| pass | ||
|
|
||
| def get_client(self): | ||
| def get_client(self, task_id): |
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.
Looks like here you didn't change comment for the function
687b1e1 to
638e2c9
Compare
extra metadata: