Open-event-server: Celery accesses SMTP configs before exporting event

Created on 10 Feb 2020  Â·  10Comments  Â·  Source: fossasia/open-event-server

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.

bug

All 10 comments

How is this an issue?

This error is thrown when send_mail function is used

This error is thrown when send_mail function is used

Wasnt this case handled in the https://github.com/fossasia/open-event-server/pull/6228 , So why celery again accesses SMTP while exporting ?

@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,
https://github.com/fossasia/open-event-server/issues/6158#issuecomment-512733961

@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.

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

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

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

@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.

Was this page helpful?
0 / 5 - 0 ratings