Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Celery accesses SMTP configs before exporting event #6833

Closed
kushthedude opened this issue Feb 10, 2020 · 10 comments
Closed

Celery accesses SMTP configs before exporting event #6833

kushthedude opened this issue Feb 10, 2020 · 10 comments
Labels

Comments

@kushthedude
Copy link
Member

kushthedude commented Feb 10, 2020

Celery needs SMTP Configuration before exporting the event.

Actual Behaviour :

Without the SMTP configuration, the event export task fails and throws this error.

[2020-02-10 17:16:00,274: ERROR/ForkPoolWorker-2] SMTP & sendgrid have not been configured properly
NoneType: None

Expected :

Event Export should work without the SMTP Configuration too.

@iamareebjamal
Copy link
Member

How is this an issue?

@kushthedude
Copy link
Member Author

kushthedude commented Feb 10, 2020 via email

@iamareebjamal
Copy link
Member

This error is thrown when send_mail function is used

@kushthedude
Copy link
Member Author

This error is thrown when send_mail function is used

Wasnt this case handled in the #6228 , So why celery again accesses SMTP while exporting ?

@mrsaicharan1
Copy link
Member

mrsaicharan1 commented Feb 10, 2020

@kushthedude What do you mean by before exporting an event? How do you exactly reproduce this?
if this happens after you click on export event,
#6158 (comment)

@kushthedude
Copy link
Member Author

@kushthedude What do you mean by before exporting an event? How do you exactly reproduce this?
if this happens after you click on export event,
#6158 (comment)

As soon as I click on export event, The loader appears and the celery throws this error.

@mrsaicharan1
Copy link
Member

mrsaicharan1 commented Feb 10, 2020

Well, in that case, this is not valid. An export event mail task is scheduled which accesses the send_mail function. Check app/api/exports.py

@kushthedude
Copy link
Member Author

kushthedude commented Feb 10, 2020

Well, in that case, this is not valid. An export event mail task is scheduled which accesses the send_mail function. Check app/api/exports.py

Agreed the task is scheduled, But the export task should also be successful. The export fails, hence this should be a valid issue

@kushthedude kushthedude reopened this Feb 10, 2020
@mrsaicharan1
Copy link
Member

mrsaicharan1 commented Feb 10, 2020

Ok, In that case, you need to be clear while mentioning the issue. Change the description to Event Export fails when SMTP settings aren't configured properly. Also mention the expected behaviour

@kushthedude
Copy link
Member Author

@iamareebjamal @mrsaicharan1 I digged deep into the issue and it is not happening due to the server rather the FE url being generated is http://127.0.0.1:5000/v1/http://127.0.0.1:5000/static/media/exports/13/zip/ZDlVMEJ4Y0/event13.zip. There is an extra server URL param before the actual export zip URL which is being added due to https://github.com/fossasia/open-event-frontend/blob/development/app/components/events/view/export/download-zip.js#L12 . I will fix this on FE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants