mirror of
https://github.com/Balshgit/mosgortrans.git
synced 2026-02-03 11:20:56 +03:00
run commands in ThreadPool
This commit is contained in:
@@ -2,9 +2,16 @@
|
||||
|
||||
echo "starting the bot"
|
||||
|
||||
gunicorn main:create_app \
|
||||
--bind 0.0.0.0:8084 \
|
||||
--worker-class aiohttp.GunicornWebWorker \
|
||||
--timeout 150 \
|
||||
--max-requests 2000 \
|
||||
--max-requests-jitter 400
|
||||
if [[ "${START_WITH_WEBHOOK}" == "true" ]]
|
||||
then
|
||||
echo "Starting bot in webhook mode..."
|
||||
gunicorn main:create_app \
|
||||
--bind ${WEBAPP_HOST}:${WEBAPP_PORT} \
|
||||
--worker-class aiohttp.GunicornWebWorker \
|
||||
--timeout 150 \
|
||||
--max-requests 2000 \
|
||||
--max-requests-jitter 400
|
||||
else
|
||||
echo "Starting bot in polling mode..."
|
||||
python main.py
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user