-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Workaround for later initialization, recovers document_ttl #318
Conversation
Thanks @asteppke.
What do you mean by "changed traitlets infrastructure"? |
def __init__(self, *args, **kwargs): | ||
super().__init__(*args, **kwargs) | ||
# Class is instantiated later, so we need to set the document_ttl here | ||
self.document_ttl = int(self.document_ttl) if self.document_ttl is not None else 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.
I don't understand what this changes. Could you write a test that shows that this fixes something?
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.
I added a test that checks whether the store has the correct parameter from the command line arguments.
Without the changeset above the store writing fails immediately if document_ttl is set.
I did not bisect this in detail but when you implemented the So this adding the missing conversion step. I can see if this can be shown also within the a test in the test suite. |
Allow manual workflow
I added the corresponding tests for the document_ttl. Other unrelated tests fail though already without these commits. |
This is a short fix for #315.
In the future this can be updated when the changed traitlets infrastructure is fully taken into account but for now this restores the
document_ttl
functionality and should have no negative side effects.