Skip to content

Add Twisted support for LDD mode#55

Merged
drichelson merged 10 commits into
masterfrom
dr/twistedv2
Aug 23, 2016
Merged

Add Twisted support for LDD mode#55
drichelson merged 10 commits into
masterfrom
dr/twistedv2

Conversation

@drichelson

Copy link
Copy Markdown
Contributor

Part of this is recycled from before we removed Twisted support.

Comment thread ldclient/feature_store.py
self._features = {}

def get(self, key):
def get(self, key, callback):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically this is an interface change that should require us to change the version to 3.0..

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work in the non-twisted world?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes- Locally I ran the integration harness against the redis and in-memory feature store

store = self.base_initialized_store(store)
expected = self.make_feature('foo', 10)
assert store.get('foo') == expected
assert store.get('foo', lambda x: x) == expected

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be clearer to define this identity function once, and reference it in all the places.

@pkaeding

Copy link
Copy Markdown
Contributor

lgtm
👍
looks good to me
merge away
I approve
canned replies are great.

@jkodumal

Copy link
Copy Markdown
Contributor

Is there a twisted RESTWrapper in place?

@drichelson

Copy link
Copy Markdown
Contributor Author

@jkodumal This is only for LDD mode. We don't have LDD running in our restwrapper environment, but the twisted restwrapper passes locally.

@drichelson drichelson merged commit a44055d into master Aug 23, 2016
@drichelson drichelson deleted the dr/twistedv2 branch August 23, 2016 01:50
eli-darkly added a commit that referenced this pull request May 25, 2018
detect uWSGI threads option, not just enable-threads
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