-
Notifications
You must be signed in to change notification settings - Fork 5
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
Convert server status endpoint to ninja #234
Conversation
dff0702
to
6333542
Compare
4fe7896
to
626b211
Compare
626b211
to
12ef4e6
Compare
@staticmethod | ||
def resolve_iso8601(obj: datetime.timedelta): | ||
return str(obj) |
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.
Note, this returns a slightly different string than the DRF serializer for datetime.timedelta
. Previously, the return value would look something like 6 05:04:40.740791
, but now it is 6 days, 05:04:40.740791
.
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 testing, I'm getting back an iso8601 duration format: "iso8601": "P0DT00H03M56.226221S"
which I think is fine.
@BryonLewis with #243 being merged, this is now the last Ninja conversion. I'll make a follow up PR to this that removes the remaining bits of DRF (mostly DRF exceptions still being used). |
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 fine to me. I may update this endpoint in the future to include capabilities (Like knowing that there is a scoring database connected).
@staticmethod | ||
def resolve_iso8601(obj: datetime.timedelta): | ||
return str(obj) |
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 testing, I'm getting back an iso8601 duration format: "iso8601": "P0DT00H03M56.226221S"
which I think is fine.
No description provided.