Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(redis): socket timeout. #1956

Merged
merged 4 commits into from Jan 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion pybossa/default_settings.py
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
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
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
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