mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
Don't write logs to the server's working directory when DEPLOYED.
Otherwise these logs will end up all getting split up when we switch to the new deployment model. (imported from commit 0514c296470be7113cab6c2f48e8dd33f1b9353d)
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
from django.conf import settings
|
||||
import os
|
||||
import logging
|
||||
|
||||
STATS_DIR = os.path.join(os.path.dirname(__file__), "..", "..", "stats")
|
||||
|
||||
def update_stat(name, value):
|
||||
try:
|
||||
os.mkdir(STATS_DIR)
|
||||
os.mkdir(settings.STATS_DIR)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
base_filename = os.path.join(STATS_DIR, name)
|
||||
base_filename = os.path.join(settings.STATS_DIR, name)
|
||||
tmp_filename = base_filename + ".new"
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user