Skip to content

Commit 12f2c05

Browse files
authored
Merge pull request #331 from Seluj78/hotfix/fixed-celery
Updated Celery config
2 parents c892fd9 + d2fb1ad commit 12f2c05

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

backend/PyMatcha/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@
107107

108108
logging.debug("Configuring Celery Redis URLs")
109109
# Celery configuration
110-
application.config["CELERY_BROKER_URL"] = CELERY_BROKER_URL
111-
application.config["CELERY_RESULT_BACKEND"] = CELERY_RESULT_BACKEND
110+
application.config["CELERY_broker_url"] = CELERY_BROKER_URL
111+
application.config["result_backend"] = CELERY_RESULT_BACKEND
112112

113113
logging.debug("Initializing Celery")
114114
# Initialize Celery

backend/PyMatcha/routes/api/profile/edit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def edit_email():
185185
token = generate_confirmation_token(email=new_email, token_type="confirm")
186186
link = FRONTEND_EMAIL_CONFIRMATION_URL + token
187187
rendered_html = render_template("confirm_email.html", link=link)
188-
send_mail_html.delay(dest=data["email"], subject="Confirm your email on PyMatcha", html=rendered_html)
188+
send_mail_html.delay(dest=new_email, subject="Confirm your email on PyMatcha", html=rendered_html)
189189
return Success("Email sent for new email")
190190

191191

backend/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ cryptography==3.1.1
2020

2121
flask_jwt_extended==3.24.1
2222

23-
flake8==3.8.3
23+
flake8==3.8.4
2424
black==20.8b1
2525
pre-commit==2.7.1
2626

workers.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ ENV PYTHONDONTWRITEBYTECODE 1
77
EXPOSE 5000
88
ADD .env .
99
RUN export $(cat .env | xargs)
10-
CMD celery worker --workdir . -A PyMatcha.celery -B --loglevel=info --concurrency=1
10+
CMD celery -A PyMatcha.celery worker --concurrency=1 -E --loglevel=INFO -B

0 commit comments

Comments
 (0)