Skip to content
Browse files

Patch TIMEOUT to be override-able by a setting

  • Loading branch information...
1 parent e29a35c commit 0e4437f39b6cc3deee74bc27fee4ce2e6c3a170a Nigel Babu committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 urls.py
View
4 urls.py
@@ -4,8 +4,11 @@
from django.shortcuts import redirect
import jingo
+import sphinxapi
from django_arecibo.tasks import post as arecibo_post
+sphinxapi.TIMEOUT = getattr(settings, 'SPHINX_TIMEOUT', 1)
+
def _error_page(request, status):
"""Render error pages with jinja2."""
@@ -15,6 +18,7 @@ def _error_page(request, status):
handler404 = lambda r: _error_page(r, 404)
handler_csrf = lambda r, reason: jingo.render(r, 'csrf_error.html')
+
def handler500(request):
arecibo = getattr(settings, 'ARECIBO_SERVER_URL', '')

0 comments on commit 0e4437f

Please sign in to comment.
Something went wrong with that request. Please try again.