Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixed but with changes() always timing out efter 20 seconds #36

Merged
merged 3 commits into from

2 participants

David Björkevik Jyrki Pulliainen
David Björkevik

Increased tornado http timeout to 20 seconds more than couchdb timeout
when using feed=continuous with changes()

Jyrki Pulliainen
Collaborator

Thanks for the Pull Request!

Can you clarify what's the rational behind this?

Jyrki Pulliainen nailor closed this
Jyrki Pulliainen
Collaborator

I'm closing this pull request as I fail to see the rational of adding 20 second extra timeout. Feel free to comment here or open a new one, if you disagree.

David Björkevik
Jyrki Pulliainen nailor reopened this
Jyrki Pulliainen
Collaborator

Ah, you're correct. For some unknown reason I seem to have accidentally removed that functionality in b850270.

I'm not too confident with extra 20 seconds, as that is a really long timeout, but maybe a smaller increment, 0.5 or so, would do the trick. The client timeout needs to be a bit smaller anyway for this to work.

Can you alter your commit to reduce the timeout and amend it, I'll merge it then :)

David Björkevik

I think I've done that now. Let me know if something needs fixing, I'm a GitHub noob.

Jyrki Pulliainen
Collaborator

One tiny change: can you add yuorself to the AUTHORS file and I'll merge this :)

Jyrki Pulliainen nailor merged commit f985d43 into from
Jyrki Pulliainen
Collaborator

Merged! Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 1 deletion.
  1. +1 −0  AUTHORS
  2. +2 −1  trombi/client.py
1  AUTHORS
View
@@ -7,5 +7,6 @@ Since open sourcing it following people have helped to develope it
further (in alphabetical order by last name):
- Jarrod Baumann (https://github.com/jarrodb)
+- David Björkevik (https://github.com/bjorkegeek)
- Jeremy Kelley (https://github.com/nod)
- Daniel Truemper (https://github.com/retresco)
3  trombi/client.py
View
@@ -673,11 +673,12 @@ def _stream(text):
couchdb_params = kw
couchdb_params['feed'] = feed
+ params = dict()
if timeout is not None:
# CouchDB takes timeouts in milliseconds
couchdb_params['timeout'] = timeout * 1000
+ params['request_timeout'] = timeout + 1
url = '_changes?%s' % urlencode(couchdb_params)
- params = dict()
if feed == 'continuous':
params['streaming_callback'] = _stream
Something went wrong with that request. Please try again.