From e59d7cae48ac8e46f3f200e6c95496322b298665 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 3 Oct 2012 15:26:40 -0400 Subject: [PATCH] Rename the Zephyr log to the Message log. (imported from commit 7dedfb76b6b78ea90a2bfd20788e251c9c29ef47) --- humbug/settings.py | 2 +- zephyr/models.py | 8 ++++---- zephyr/tests.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/humbug/settings.py b/humbug/settings.py index f7289cd06d..856e49a8f0 100644 --- a/humbug/settings.py +++ b/humbug/settings.py @@ -192,7 +192,7 @@ DEFAULT_FROM_EMAIL = "Humbug " 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. if not deployed: diff --git a/zephyr/models.py b/zephyr/models.py index 2c1e9d7bb2..9a5a82df9e 100644 --- a/zephyr/models.py +++ b/zephyr/models.py @@ -255,11 +255,11 @@ def get_user_profile_by_id(uid): return UserProfile.objects.get(id=uid) def log_message(zephyr): - if not os.path.exists(settings.ZEPHYR_LOG + '.lock'): - file(settings.ZEPHYR_LOG + '.lock', "w").write("0") - lock = open(settings.ZEPHYR_LOG + '.lock', 'r') + if not os.path.exists(settings.MESSAGE_LOG + '.lock'): + file(settings.MESSAGE_LOG + '.lock', "w").write("0") + lock = open(settings.MESSAGE_LOG + '.lock', 'r') 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.flush() f.close() diff --git a/zephyr/tests.py b/zephyr/tests.py index a495d75546..4f8fdcd4e8 100644 --- a/zephyr/tests.py +++ b/zephyr/tests.py @@ -15,7 +15,7 @@ subprocess.call("zephyr/tests/generate-fixtures"); from django.conf import settings 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'