async io, omg

This commit is contained in:
rimu 2025-01-19 16:01:03 +13:00
parent 20a17c9fb7
commit 1174134c73
3 changed files with 12 additions and 3 deletions

View file

@ -1,7 +1,5 @@
import multiprocessing
workers = multiprocessing.cpu_count() * 2 + 1
threads = multiprocessing.cpu_count() * 2 + 1
workers = 1
worker_tmp_dir = '/dev/shm'
@ -9,6 +7,8 @@ bind = '0.0.0.0:5000'
umask = 0o007
reload = False
worker_class = 'gevent'
#logging
accesslog = '-'
errorlog = '-'

View file

@ -1,5 +1,12 @@
# This file is part of pyfedi, which is licensed under the GNU General Public License (GPL) version 3.0.
# You should have received a copy of the GPL along with this program. If not, see <http://www.gnu.org/licenses/>.
from gevent import monkey
monkey.patch_all()
from psycogreen.gevent import patch_psycopg
patch_psycopg()
from datetime import datetime
from flask_babel import get_locale

View file

@ -33,3 +33,5 @@ pytesseract==0.3.10
sentry-sdk==1.40.6
python-slugify==8.0.4
furl==2.1.3
gevent
psycogreen