kopia lustrzana https://github.com/piku/piku
Expose a few more uWSGI settings to apps
rodzic
777a98b551
commit
7e115394dc
10
piku.py
10
piku.py
|
@ -428,9 +428,9 @@ def spawn_worker(app, kind, command, env, ordinal=1):
|
||||||
('chdir', join(APP_ROOT, app)),
|
('chdir', join(APP_ROOT, app)),
|
||||||
('master', 'true'),
|
('master', 'true'),
|
||||||
('project', app),
|
('project', app),
|
||||||
('max-requests', '1024'),
|
('max-requests', env.get('UWSGI_MAX_REQUESTS', '1024'),
|
||||||
('listen', '4096'),
|
('listen', env.get('UWSGI_LISTEN', '4096'),
|
||||||
('processes', '2'),
|
('processes', env.get('UWSGI_PROCESSES', '4'),
|
||||||
('procname-prefix', '%s:%s:' % (app, kind)),
|
('procname-prefix', '%s:%s:' % (app, kind)),
|
||||||
('enable-threads', 'true'),
|
('enable-threads', 'true'),
|
||||||
('log-maxsize', UWSGI_LOG_MAXSIZE),
|
('log-maxsize', UWSGI_LOG_MAXSIZE),
|
||||||
|
@ -441,13 +441,13 @@ def spawn_worker(app, kind, command, env, ordinal=1):
|
||||||
if kind == 'wsgi':
|
if kind == 'wsgi':
|
||||||
settings.extend([
|
settings.extend([
|
||||||
('module', command),
|
('module', command),
|
||||||
('threads', '4'),
|
('threads', env.get('UWSGI_THREADS','4'),
|
||||||
('plugin', 'python'),
|
('plugin', 'python'),
|
||||||
])
|
])
|
||||||
if 'UWSGI_GEVENT' in env:
|
if 'UWSGI_GEVENT' in env:
|
||||||
settings.extend([
|
settings.extend([
|
||||||
('plugin', 'gevent'),
|
('plugin', 'gevent'),
|
||||||
('gevent', str(int(env['UWSGI_GEVENT']))),
|
('gevent', env['UWSGI_GEVENT']),
|
||||||
])
|
])
|
||||||
|
|
||||||
# If running under nginx, don't expose a port at all
|
# If running under nginx, don't expose a port at all
|
||||||
|
|
Ładowanie…
Reference in New Issue