Rename the Zephyr log to the Message log.

(imported from commit 7dedfb76b6b78ea90a2bfd20788e251c9c29ef47)
This commit is contained in:
Tim Abbott 2012-10-03 15:26:40 -04:00
parent 52a36945fe
commit e59d7cae48
3 changed files with 6 additions and 6 deletions

View File

@ -192,7 +192,7 @@ DEFAULT_FROM_EMAIL = "Humbug <humbug@humbughq.com>"
LOGIN_REDIRECT_URL='/' LOGIN_REDIRECT_URL='/'
ZEPHYR_LOG="all_zephyrs_log" MESSAGE_LOG="all_messages_log"
# For testing, you may want to have emails be printed to the console. # For testing, you may want to have emails be printed to the console.
if not deployed: if not deployed:

View File

@ -255,11 +255,11 @@ def get_user_profile_by_id(uid):
return UserProfile.objects.get(id=uid) return UserProfile.objects.get(id=uid)
def log_message(zephyr): def log_message(zephyr):
if not os.path.exists(settings.ZEPHYR_LOG + '.lock'): if not os.path.exists(settings.MESSAGE_LOG + '.lock'):
file(settings.ZEPHYR_LOG + '.lock', "w").write("0") file(settings.MESSAGE_LOG + '.lock', "w").write("0")
lock = open(settings.ZEPHYR_LOG + '.lock', 'r') lock = open(settings.MESSAGE_LOG + '.lock', 'r')
fcntl.flock(lock, fcntl.LOCK_EX) fcntl.flock(lock, fcntl.LOCK_EX)
f = open(settings.ZEPHYR_LOG, "a") f = open(settings.MESSAGE_LOG, "a")
f.write(simplejson.dumps(zephyr.to_log_dict()) + "\n") f.write(simplejson.dumps(zephyr.to_log_dict()) + "\n")
f.flush() f.flush()
f.close() f.close()

View File

@ -15,7 +15,7 @@ subprocess.call("zephyr/tests/generate-fixtures");
from django.conf import settings from django.conf import settings
import re import re
settings.ZEPHYR_LOG = "/tmp/test-zephyr-log" settings.MESSAGE_LOG = "/tmp/test-message-log"
settings.EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend' settings.EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend'