mirror of https://github.com/zulip/zulip.git
Rename the Zephyr log to the Message log.
(imported from commit 7dedfb76b6b78ea90a2bfd20788e251c9c29ef47)
This commit is contained in:
parent
52a36945fe
commit
e59d7cae48
|
@ -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:
|
||||||
|
|
|
@ -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()
|
||||||
|
|
|
@ -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'
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue