Skip to content
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

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

mvandenburgh
Copy link
Member

No description provided.

@mvandenburgh mvandenburgh force-pushed the convert-status-endpoint-to-ninja branch from dff0702 to 6333542 Compare July 18, 2023 21:07
@mvandenburgh mvandenburgh force-pushed the convert-status-endpoint-to-ninja branch 3 times, most recently from 4fe7896 to 626b211 Compare August 22, 2023 19:34
@mvandenburgh mvandenburgh force-pushed the convert-status-endpoint-to-ninja branch from 626b211 to 12ef4e6 Compare August 22, 2023 19:41
Comment on lines +19 to +21
@staticmethod
def resolve_iso8601(obj: datetime.timedelta):
return str(obj)
Copy link
Member Author

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.

Copy link
Contributor

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.

@mvandenburgh
Copy link
Member Author

@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).

Copy link
Contributor

@BryonLewis BryonLewis left a 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).

Comment on lines +19 to +21
@staticmethod
def resolve_iso8601(obj: datetime.timedelta):
return str(obj)
Copy link
Contributor

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.

@mvandenburgh mvandenburgh merged commit bc0d549 into main Aug 23, 2023
7 checks passed
@mvandenburgh mvandenburgh deleted the convert-status-endpoint-to-ninja branch August 23, 2023 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants