summaryrefslogtreecommitdiff
path: root/raven/utils
diff options
context:
space:
mode:
authorMatt Robenolt <matt@ydekproductions.com>2016-12-13 14:55:49 -0800
committerGitHub <noreply@github.com>2016-12-13 14:55:49 -0800
commitc2c5d876a3f0fdf7c44b0d022adde36ab61a48b2 (patch)
treeac825ea80449bced556915211869d6b27c8a83b1 /raven/utils
parentc5811503142ef30b73f21a982006a2fd64ebb28f (diff)
downloadraven-c2c5d876a3f0fdf7c44b0d022adde36ab61a48b2.tar.gz
uwsgi: also allow `threads` conf setting (#928)
uwsgi implicitly enables threads when `threads` are set without the need to set `enable-threads`. I've verified this behavior locally even when passing `--threads 0`. uwsgi only needs the key to exist.
Diffstat (limited to 'raven/utils')
-rw-r--r--raven/utils/compat.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/raven/utils/compat.py b/raven/utils/compat.py
index 5b31a8e..4a3c8bc 100644
--- a/raven/utils/compat.py
+++ b/raven/utils/compat.py
@@ -54,6 +54,11 @@ def check_threads():
except ImportError:
return
+ # When `threads` is passed in as a uwsgi option,
+ # `enable-threads` is implied on.
+ if 'threads' in opt:
+ return
+
if str(opt.get('enable-threads', '0')).lower() in ('false', 'off', 'no', '0'):
from warnings import warn
warn(Warning('We detected the use of uwsgi with disabled threads. '