revert changes to deliver_email.py introduced in dc5e78cccb

I'm pretty sure this was changed for purposes of testing

(imported from commit b4b1224a5812ceb248ded3755c0b1801797c1beb)
This commit is contained in:
acrefoot 2014-02-10 15:18:13 -05:00
parent 6b93315cc3
commit 233cfc2593
1 changed files with 2 additions and 1 deletions

View File

@ -74,7 +74,8 @@ Usage: python manage.py deliver_email
with lockfile("/tmp/zulip_email_deliver.lockfile"):
while True:
# make sure to use utcnow, otherwise it gets confused when you set the time with utcnow(), and select with now()
email_jobs_to_deliver = ScheduledJob.objects.filter(type=ScheduledJob.EMAIL)
email_jobs_to_deliver = ScheduledJob.objects.filter(type=ScheduledJob.EMAIL,
scheduled_timestamp__lte=datetime.utcnow())
if email_jobs_to_deliver:
for job in email_jobs_to_deliver:
if not send_email_job(job):