We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2953cc7 commit 1a6a2bdCopy full SHA for 1a6a2bd
2 files changed
rootfs/api/utils.py
@@ -154,8 +154,7 @@ def async_run(tasks):
154
return
155
156
# start a new async event loop
157
- loop = asyncio.new_event_loop()
158
- asyncio.set_event_loop(loop)
+ loop = asyncio.get_event_loop()
159
# https://github.com/python/asyncio/issues/258
160
executor = concurrent.futures.ThreadPoolExecutor(5)
161
loop.set_default_executor(executor)
rootfs/drycc/gunicorn/config.py
@@ -1,12 +1,12 @@
1
+import os
2
from os.path import dirname, realpath
3
from multiprocessing import cpu_count
4
5
import faulthandler
6
faulthandler.enable()
7
8
bind = '0.0.0.0'
-workers = 1
9
-threads = cpu_count() * 4 + 1
+workers = int(os.environ.get('GUNICORN_WORKERS', cpu_count() * 4 + 1))
10
11
pythonpath = dirname(dirname(dirname(realpath(__file__))))
12
timeout = 1200
0 commit comments