Commit 7d6a0af1 by Piotr Mitros

Emergency fallback if we need to stop the presses on bulk emails

parent a379ce36
......@@ -10,6 +10,7 @@ from django.contrib.auth.models import User
import mitxmako.middleware as middleware
from django.core.mail import send_mass_mail
import sys
import datetime
......@@ -56,3 +57,8 @@ rate -- messages per second
time.sleep(1)
print i,
i = i+len(users)
# Emergency interruptor
if os.path.exists("/tmp/stopemails.txt"):
self.log_file.close()
sys.exit(-1)
self.log_file.close()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment