Skip to content

Commit

Permalink
Merge pull request #36 from bjorkegeek/master
Browse files Browse the repository at this point in the history
Fixes changes() always timing out after 20 seconds
  • Loading branch information
nailor committed May 5, 2012
2 parents 2736ec0 + 3a1f1c2 commit f985d43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ Since open sourcing it following people have helped to develope it
further (in alphabetical order by last name): further (in alphabetical order by last name):


- Jarrod Baumann (https://github.com/jarrodb) - Jarrod Baumann (https://github.com/jarrodb)
- David Björkevik (https://github.com/bjorkegeek)
- Jeremy Kelley (https://github.com/nod) - Jeremy Kelley (https://github.com/nod)
- Daniel Truemper (https://github.com/retresco) - Daniel Truemper (https://github.com/retresco)
3 changes: 2 additions & 1 deletion trombi/client.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -673,11 +673,12 @@ def _stream(text):


couchdb_params = kw couchdb_params = kw
couchdb_params['feed'] = feed couchdb_params['feed'] = feed
params = dict()
if timeout is not None: if timeout is not None:
# CouchDB takes timeouts in milliseconds # CouchDB takes timeouts in milliseconds
couchdb_params['timeout'] = timeout * 1000 couchdb_params['timeout'] = timeout * 1000
params['request_timeout'] = timeout + 1
url = '_changes?%s' % urlencode(couchdb_params) url = '_changes?%s' % urlencode(couchdb_params)
params = dict()
if feed == 'continuous': if feed == 'continuous':
params['streaming_callback'] = _stream params['streaming_callback'] = _stream


Expand Down

0 comments on commit f985d43

Please sign in to comment.