ambitioninc / django-entity-emailer

:mailbox: Send email to Entities.
MIT License
8 stars 8 forks source link

Unsent emails task #4

Closed swans-one closed 10 years ago

swans-one commented 10 years ago

@wesleykendall @jmcriffey This commit adds a task to entity_emailer.tasks, to be added to a CELERYBEAT_SCHEDULE, where it will periodically check for any emails that are scheduled to be sent, and send them if they are due.

As a part of this, some code from the immediate sending task is factored out and some tests are arranged.

It also fixes some bugs, including setting the Email.sent field to a datetime once an email has been sent (instead of leaving it null).

jeffrifwald commented 10 years ago

@Wilduck Looks good. Just had a couple of minor comments.

swans-one commented 10 years ago

@wesleykendall @jmcriffey I've addressed the stylistic issues here. I'm going to merge this and start a new branch to take care of concurrency issues.