Skip to content

Commit

Permalink
feat: add gevent
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfromyeg committed Dec 30, 2023
1 parent 24cedb0 commit da7dcba
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ ENV FLASK_APP=bereal.server

EXPOSE 5000

CMD ["gunicorn", "-w", "4", "-t" "600", "bereal.server:app"]
CMD ["gunicorn", "-k", "gevent", "-w", "4", "-t" "600", "bereal.server:app"]
5 changes: 5 additions & 0 deletions bereal/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
It contains the Flask app routing and the functions to interact with the BeReal API.
"""
from gevent import monkey

# TODO(michaelfromyeg): move
monkey.patch_all()

import os
import warnings
from datetime import datetime, timedelta
Expand Down
2 changes: 2 additions & 0 deletions requirements/common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ Flask==3.0.0
Flask-APScheduler==1.13.1
flask-cors==4.0.0
Flask-SQLAlchemy==3.1.1
gevent==23.9.1
gunicorn==21.2.0
librosa==0.10.1
moviepy==1.0.3
numpy==1.26.2
Expand Down
1 change: 0 additions & 1 deletion requirements/prod.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
gunicorn
-r common.txt

0 comments on commit da7dcba

Please sign in to comment.