mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 11:26:56 -08:00
async io, omg
This commit is contained in:
parent
20a17c9fb7
commit
1174134c73
3 changed files with 12 additions and 3 deletions
|
@ -1,7 +1,5 @@
|
||||||
import multiprocessing
|
|
||||||
|
|
||||||
workers = multiprocessing.cpu_count() * 2 + 1
|
workers = 1
|
||||||
threads = multiprocessing.cpu_count() * 2 + 1
|
|
||||||
|
|
||||||
worker_tmp_dir = '/dev/shm'
|
worker_tmp_dir = '/dev/shm'
|
||||||
|
|
||||||
|
@ -9,6 +7,8 @@ bind = '0.0.0.0:5000'
|
||||||
umask = 0o007
|
umask = 0o007
|
||||||
reload = False
|
reload = False
|
||||||
|
|
||||||
|
worker_class = 'gevent'
|
||||||
|
|
||||||
#logging
|
#logging
|
||||||
accesslog = '-'
|
accesslog = '-'
|
||||||
errorlog = '-'
|
errorlog = '-'
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
# This file is part of pyfedi, which is licensed under the GNU General Public License (GPL) version 3.0.
|
# 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/>.
|
# 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 datetime import datetime
|
||||||
|
|
||||||
from flask_babel import get_locale
|
from flask_babel import get_locale
|
||||||
|
|
|
@ -33,3 +33,5 @@ pytesseract==0.3.10
|
||||||
sentry-sdk==1.40.6
|
sentry-sdk==1.40.6
|
||||||
python-slugify==8.0.4
|
python-slugify==8.0.4
|
||||||
furl==2.1.3
|
furl==2.1.3
|
||||||
|
gevent
|
||||||
|
psycogreen
|
||||||
|
|
Loading…
Reference in a new issue