Skip to content

Commit

Permalink
Merge pull request Scifabric#1956 from Scifabric/fix-redis-socket-tim…
Browse files Browse the repository at this point in the history
…eout

fix(redis): socket timeout.
  • Loading branch information
teleyinex authored Jan 11, 2020
2 parents 5f81d14 + e5c18e5 commit 67d1537
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pybossa/default_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
REDIS_SENTINEL = [('localhost', 26379)]
REDIS_MASTER = 'mymaster'
REDIS_DB = 0
REDIS_SOCKET_TIMEOUT = 0.1
REDIS_SOCKET_TIMEOUT = None
REDIS_RETRY_ON_TIMEOUT = True

REDIS_KEYPREFIX = 'pybossa_cache'
Expand Down
2 changes: 1 addition & 1 deletion pybossa/sentinel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(self, app=None):
self.init_app(app)

def init_app(self, app):
socket_timeout = app.config.get('REDIS_SOCKET_TIMEOUT', 0.1)
socket_timeout = app.config.get('REDIS_SOCKET_TIMEOUT', None)
retry_on_timeout = app.config.get('REDIS_RETRY_ON_TIMEOUT', True)
self.connection = sentinel.Sentinel(app.config['REDIS_SENTINEL'],
socket_timeout=socket_timeout,
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"rax-default-network-flags-python-novaclient-ext==0.4.0",
"rax-scheduled-images-python-novaclient-ext==0.3.1",
"readability-lxml==0.7",
"redis==3.0.1",
"redis==3.3.6",
"rednose==1.3.0",
"requests==2.21.0",
"requests-oauthlib==1.0.0",
Expand Down Expand Up @@ -144,7 +144,7 @@

setup(
name = 'pybossa',
version = '3.0.0',
version = '3.0.1',
packages = find_packages(),
install_requires = requirements,
# only needed when installing directly from setup.py (PyPi, eggs?) and pointing to e.g. a git repo.
Expand Down
4 changes: 2 additions & 2 deletions test/test_model/test_model_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ def test_all(self):

project = db.session.query(Project).get(project_id)
assert project.name == 'My New Project', project
# year would start with 201...
assert project.created.startswith('201'), project.created
# year would start with 202...
assert project.created.startswith('202'), project.created
assert len(project.tasks) == 1, project
assert project.owner.name == username, project
out_task = project.tasks[0]
Expand Down

0 comments on commit 67d1537

Please sign in to comment.