Skip to content

Allow this to work under gevent by using grequests#6

Open
richtera wants to merge 7 commits intogns24:masterfrom
richtera:master
Open

Allow this to work under gevent by using grequests#6
richtera wants to merge 7 commits intogns24:masterfrom
richtera:master

Conversation

@richtera
Copy link
Copy Markdown
Contributor

Check whether gevent is loader and if it is, then use grequests instead of requests.
Otherwise this module hangs a system with gevent loaded.

@richtera
Copy link
Copy Markdown
Contributor Author

Sorry this patch is not quite right.

@richtera
Copy link
Copy Markdown
Contributor Author

This now works although I figured out the hang was due to the fact that uwsgi's main thread (the one loading the wsgi file) is suspended and cannot be used to make requests, httplib2 or urllib3 calls. At least this is what cleared out my hangs.

Comment thread datomic.py
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.

Instead of doing this, you probably want to abstract out the transport layer from the database, and pass the transport in Database.init().

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