From 233cfc259311eb362dab7e5ab78f741e1f85faac Mon Sep 17 00:00:00 2001 From: acrefoot Date: Mon, 10 Feb 2014 15:18:13 -0500 Subject: [PATCH] revert changes to deliver_email.py introduced in dc5e78cccb I'm pretty sure this was changed for purposes of testing (imported from commit b4b1224a5812ceb248ded3755c0b1801797c1beb) --- zerver/management/commands/deliver_email.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zerver/management/commands/deliver_email.py b/zerver/management/commands/deliver_email.py index 78f7484fd4..9f5681256d 100755 --- a/zerver/management/commands/deliver_email.py +++ b/zerver/management/commands/deliver_email.py @@ -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):