Skip to content

Commit

Permalink
Nice preset. Threads are now on by default for PythonSection.
Browse files Browse the repository at this point in the history
  • Loading branch information
idlesign committed Oct 11, 2017
1 parent 7bea02c commit daeadc5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ uwsgiconf changelog

Unreleased
----------
* Nice preset. Threads are now on by default for PythonSection.
+ Sockets and Routers reworked.


Expand Down
8 changes: 6 additions & 2 deletions uwsgiconf/presets/nice.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class PythonSection(Section):

def __init__(
self, name=None, params_python=None, wsgi_module=None, embedded_plugins=True,
require_app=True, **kwargs):
require_app=True, threads=True, **kwargs):
"""
:param str|unicode name: Section name.
Expand All @@ -97,12 +97,16 @@ def __init__(
:param bool require_app: Exit if no app can be loaded.
:param int|bool threads: Number of threads per worker or ``True`` to enable user-made threads support.
:param kwargs:
"""
if embedded_plugins is True:
embedded_plugins = self.embedded_plugins_presets.BASIC + ['python', 'python2', 'python3']

super(PythonSection, self).__init__(name=name, embedded_plugins=embedded_plugins, **kwargs)
super(PythonSection, self).__init__(
name=name, embedded_plugins=embedded_plugins, threads=threads,
**kwargs)

self.python.set_basic_params(**(params_python or {}))

Expand Down

0 comments on commit daeadc5

Please sign in to comment.