In acoustic.py, we have a function named send_mail and attempt_send_mail , which both receive the arguments (to, campaign_id, fields, bcc, save_to_db).
Originally, only send_mail received these arguments and converted them to a singular XML object using the function transact_xml. Once converted, we then sent this object to the attempt_send_mail function, which used to recieve only the arguments (self, xml).
However in PR #1654 (where we implemented a try/except block to retry sending the email in case of a connection error), we had trouble getting the python scheduler to work with this singular XML object.
If we find a way to remove so many (to, campaign_id, fields, bcc, save_to_db) though and get the scheduler to work, I believe this might help make the code easier to read/understand/maintain.
[Follow up issue to #1654]
In acoustic.py, we have a function named send_mail and attempt_send_mail , which both receive the arguments
(to, campaign_id, fields, bcc, save_to_db)
.Originally, only send_mail received these arguments and converted them to a singular XML object using the function transact_xml. Once converted, we then sent this object to the attempt_send_mail function, which used to recieve only the arguments
(self, xml)
.However in PR #1654 (where we implemented a try/except block to retry sending the email in case of a connection error), we had trouble getting the python scheduler to work with this singular XML object.
If we find a way to remove so many
(to, campaign_id, fields, bcc, save_to_db)
though and get the scheduler to work, I believe this might help make the code easier to read/understand/maintain.