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

Lazy connections #2

Merged
merged 2 commits into from Aug 5, 2016
Merged

Lazy connections #2

merged 2 commits into from Aug 5, 2016

Conversation

@sirsgriffin
Copy link
Contributor

@sirsgriffin sirsgriffin commented May 13, 2015

Making these network calls proactively in our constructors is not a good
practice. Constructors should only configure the object for use and NOT
actually instantiate non-config object properties.

Perfect case for lazy-loading is testing. Unless the object is heavily
mocked these network calls would 1) require a network connection for
testing even if the object is only instantiated in the test and not used
and 2) slow down tests due to network calls.

Scott Griffin added 2 commits May 13, 2015
Making these newtork calls proactively in our constructors is not a good
practice. Constructors should only configure the object for use and NOT
actually instantiate non-config object properties.

Perfect case for lazy-loading is testing. Unless the object is heavily
mocked these network calls would 1) require a network connection for
testing even if the object is only instanted in the test and not used
and 2) slow down tests due to network calls.
Updated setup.py to use this version property so there is only one
source of truth.
@sirsgriffin sirsgriffin merged commit 74169f1 into loggly:master Aug 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.