Skip to content

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

Merged
merged 5 commits into from
Feb 25, 2019

Conversation

shakeelmohamed
Copy link
Contributor

Closes #168

@@ -16,8 +16,6 @@
from __future__ import absolute_import
from __future__ import print_function

import unittest2

Copy link
Contributor

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):
Copy link
Contributor

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

Copy link
Contributor Author

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()
Copy link
Contributor

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

Copy link
Contributor Author

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()

@shakeelmohamed shakeelmohamed merged commit 44eb11c into develop Feb 25, 2019
@shakeelmohamed shakeelmohamed deleted the perf/update-delete-input branch February 25, 2019 23:13
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.

3 participants