-
Notifications
You must be signed in to change notification settings - Fork 380
Performance improvement for updating or deleting input #247
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
Conversation
@@ -16,8 +16,6 @@ | |||
from __future__ import absolute_import | |||
from __future__ import print_function | |||
|
|||
import unittest2 | |||
|
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.
Good catch
@@ -463,6 +463,13 @@ def info(self): | |||
response = self.get("/services/server/info") | |||
return _filter_content(_load_atom(response, MATCH_ENTRY_CONTENT)) | |||
|
|||
def input(self, path, kind=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.
Not a big deal, but should we follow Go style practices of adding a new prefix to the declaration?
Like this
def new_input(self, path, kind=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.
not if we want consistency, so I'm going to say let's not do that here
|
||
:return: A :class:`Input` object. | ||
""" | ||
return Input(self, path, kind=kind).refresh() |
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.
Non-blocking Personal Opinion: I like to see these operations broken down atomically because it makes things easier to debug.
new_input = Input(self, path, kind=kind)
new_input.refresh()
return new_input
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.
fair, I'm just following the style I used for job()
Closes #168