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
Major Tom 2: A missão #2031
Major Tom 2: A missão #2031
Conversation
7d2ef8d
to
eb7d5f1
Compare
86e574a
to
8a4566b
Compare
def installed_version(self) -> Optional[VersionInfo]: | ||
try: | ||
req = requests.get("http://localhost/version-chooser/v1.0/version/current", timeout=3) | ||
if req.status_code == 200: |
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.
if req.status_code == 200: | |
if req.status_code == http.client.OK: |
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.
nice
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.
missing
c94406e
to
20b05af
Compare
18672fc
to
89edc8a
Compare
def installed_version(self) -> Optional[VersionInfo]: | ||
try: | ||
req = requests.get("http://localhost/version-chooser/v1.0/version/current", timeout=3) | ||
if req.status_code == 200: |
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.
missing
core/services/major_tom/src/core.py
Outdated
timestamp: str | ||
hardware_id: str | ||
blueos_id: str | ||
data: dict[str, Any] |
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.
Since this is a generic dict, aren't we supposed to have the serialized data with a defined type property to specify what is exactly in this field ?
Like:
data: {
type: 'AnonymousTelemetryRecord'
...
}
89edc8a
to
f55ad16
Compare
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.
Nice!
This creates Major Tom, again. The code is mostly by @voorloopnul
This leverages on loguru to store and rotate the data.