Skip to content

Commit

Permalink
Merge pull request EthTx#108 from EthTx/dev
Browse files Browse the repository at this point in the history
Use `gthread` worker (EthTx#107)
  • Loading branch information
kchojn authored Apr 13, 2022
2 parents 6d440cf + efbc5c7 commit f2cb902
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ run-local:

run-prod:
fuser -k 5000/tcp || true
PYTHONPATH=./ethtx_ce pipenv run gunicorn --workers 4 --max-requests 4000 --timeout 600 --bind :5000 app.wsgi:app
PYTHONPATH=./ethtx_ce pipenv run gunicorn -k gthread --workers 4 --max-requests 4000 --timeout 600 --bind :5000 app.wsgi:app

run-docker:
fuser -k 5000/tcp || true
Expand Down
3 changes: 1 addition & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ web3 = "==5.26.0"
python-dotenv = "*"
flask = ">=2.0.2"
werkzeug = ">=2.0.2"
gunicorn = ">=20.1.0"
gunicorn = {version = ">=20.1.0", extras = ["gthread"]}
flask-httpauth = ">=4.5.0"
gitpython = ">=3.1.24"
jsonpickle = ">=2.0.0"
meinheld = ">=1.0.2"

[dev-packages]
black = "==21.12b0"
Expand Down
2 changes: 1 addition & 1 deletion ethtx_ce/start-reload.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ set -e

# Start Gunicorn
echo "Starting Gunicorn..."
exec pipenv run gunicorn "--reload" -k egg:meinheld#gunicorn_worker -c "$GUNICORN_CONF" "$APP_MODULE"
exec pipenv run gunicorn "--reload" -k gthread -c "$GUNICORN_CONF" "$APP_MODULE"
2 changes: 1 addition & 1 deletion ethtx_ce/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ set -e

# Start Gunicorn
echo "Starting Gunicorn..."
exec pipenv run gunicorn -k egg:meinheld#gunicorn_worker -c "$GUNICORN_CONF" "$APP_MODULE"
exec pipenv run gunicorn -k gthread -c "$GUNICORN_CONF" "$APP_MODULE"

0 comments on commit f2cb902

Please sign in to comment.