From 36ded61e36d940cf46465b4aa52d66d211112a3a Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 15 Jul 2020 09:19:03 +0200 Subject: [PATCH] update Makefile --- Makefile | 4 ++-- Makefile.custom.config.example | 3 +++ fittrackee_api/fittrackee_api/tasks.py | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c35f2162..96286c07 100644 --- a/Makefile +++ b/Makefile @@ -79,7 +79,7 @@ recalculate: $(FLASK) recalculate run: - $(MAKE) P="run-server run-client" make-p + $(MAKE) P="run-server run-workers run-client" make-p run-client: serve -s fittrackee_client/build -l 3000 >> serve.log 2>&1 @@ -88,7 +88,7 @@ run-server: cd fittrackee_api && $(GUNICORN) -b 127.0.0.1:5000 "fittrackee_api:create_app()" --error-logfile ../gunicorn-error.log run-workers: - $(FLASK) worker --processes=1 + $(FLASK) worker --processes=$(WORKERS_PROCESSES) >> workers.log 2>&1 serve-python: $(FLASK) run --with-threads -h $(HOST) -p $(API_PORT) diff --git a/Makefile.custom.config.example b/Makefile.custom.config.example index cb9e0049..bb1f0c8d 100644 --- a/Makefile.custom.config.example +++ b/Makefile.custom.config.example @@ -1,9 +1,12 @@ +WORKERS_PROCESSES = 1 + export REACT_APP_API_URL= export REACT_APP_THUNDERFOREST_API_KEY= export WEATHER_API= export UI_URL= export EMAIL_URL= export SENDER_EMAIL= +export REDIS_URL= # for dev env export CODACY_PROJECT_TOKEN= diff --git a/fittrackee_api/fittrackee_api/tasks.py b/fittrackee_api/fittrackee_api/tasks.py index 8ea0f363..34c370e0 100644 --- a/fittrackee_api/fittrackee_api/tasks.py +++ b/fittrackee_api/fittrackee_api/tasks.py @@ -1,7 +1,7 @@ from fittrackee_api import dramatiq, email_service -@dramatiq.actor() +@dramatiq.actor(queue_name='fittrackee_emails') def reset_password_email(user, email_data): email_service.send( template='password_reset_request',