Skip to content

Commit 9bba0af

Browse files
authored
Merge pull request #55 from launchdarkly/eb/ch17815/uwsgi-threads
detect uWSGI threads option, not just enable-threads
2 parents 10e60f5 + 5894df0 commit 9bba0af

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

ldclient/util.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,12 @@ def check_uwsgi():
4848
# noinspection PyPackageRequirements,PyUnresolvedReferences
4949
import uwsgi
5050

51-
if not uwsgi.opt.get('enable-threads'):
52-
log.error('The LaunchDarkly client requires the enable-threads option be passed to uWSGI. '
53-
'To learn more, see http://docs.launchdarkly.com/v1.0/docs/python-sdk-reference#configuring-uwsgi')
51+
if uwsgi.opt.get('enable-threads'):
52+
return
53+
if uwsgi.opt.get('threads') is not None and int(uwsgi.opt.get('threads')) > 1:
54+
return
55+
log.error("The LaunchDarkly client requires the 'enable-threads' or 'threads' option be passed to uWSGI. "
56+
'To learn more, see http://docs.launchdarkly.com/v1.0/docs/python-sdk-reference#configuring-uwsgi')
5457

5558

5659
class Event(object):

0 commit comments

Comments
 (0)