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

simplify/fix email handling #93

Closed
4 tasks done
syjer opened this issue Dec 7, 2015 · 0 comments
Closed
4 tasks done

simplify/fix email handling #93

syjer opened this issue Dec 7, 2015 · 0 comments
Assignees
Milestone

Comments

@syjer
Copy link
Member

syjer commented Dec 7, 2015

Currently the email queue has some shortcomings coming from a previous design that must be addressed:

  • the retry mechanism don't seems to work
  • a more than necessary complexity in handling the retry/old emails
  • the checksum mechanism for avoiding to send duplicate email should consider a window of time
  • the full email message should only be loaded at the last moment, currently we are loading too much

Proposed design:

  • eliminate notificationManager.processNotSentEmail.
  • add a error_count field for the retry so we can have a backoff policy.
  • The query for selecting the ids of the mail to be sent will be something like select id from email_message where status in ('WAIT', 'RETRY') and request_ts < sysdate)
  • in case of error when sending the email, we set the request_ts in the future and increment the error_count and set the status to RETRY. The amount of minutes added from now depend of the number of error_count. If error_count is over a certain amount, the email status is marked as 'ERROR'.
@syjer syjer added this to the 1.7 milestone Dec 16, 2015
@syjer syjer self-assigned this Dec 16, 2015
syjer added a commit that referenced this issue Jan 27, 2016
syjer added a commit that referenced this issue Jan 27, 2016
@syjer syjer closed this as completed Feb 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant