-
Notifications
You must be signed in to change notification settings - Fork 156
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
feat: Replace sessions
, kernels
's status_history
's type dict
with list
#3201
base: main
Are you sure you want to change the base?
feat: Replace sessions
, kernels
's status_history
's type dict
with list
#3201
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
@HyeockJinKim How can we specifically implement a length restriction? |
for item in reversed(status_history_log): | ||
if item["status"] == status: | ||
return dtparse(item["timestamp"]) | ||
return None |
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.
@HyeockJinKim reversed()
return Iterator, so it allows iterating from the end of the list without copying the entire list, eliminating the need to use range()
.
But we should use reversed()
alone, not list(reversed(...))
which copy the entire list.
656df34
to
dceabcc
Compare
Broken CI will be fixed in #3235. |
Co-authored-by: octodog <[email protected]>
850165f
to
98c21c0
Compare
Resolves #3200, Part of #3214.
Refs #412, follow-up to #480.
The current implementation saves only the most recent timestamp whenever status information in
status_history
is updated, and all previous information is deleted.This PR prevents the loss of timestamp information by changing the data structure of
sessions
,kernels
'sstatus_history
to List.Previous format:
New format:
Checklist: (if applicable)
📚 Documentation preview 📚: https://sorna--3201.org.readthedocs.build/en/3201/
📚 Documentation preview 📚: https://sorna-ko--3201.org.readthedocs.build/ko/3201/