Browse Source

update startup monitor rule for new filename of gunicorn logs

tags/v1.1.0
liangyongxiong 5 years ago
parent
commit
a439a5681f
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      mindinsight/backend/run.py
  2. +1
    -1
      mindinsight/scripts/stop.py

+ 2
- 2
mindinsight/backend/run.py View File

@@ -118,14 +118,14 @@ def _get_error_log_path():
str, the path of error log. str, the path of error log.
""" """


path = os.path.join(settings.WORKSPACE, 'log/gunicorn/error.log')
path = os.path.join(settings.WORKSPACE, 'log/gunicorn/error.{}.log'.format(settings.PORT))
errorlog_abspath = os.path.realpath(path) errorlog_abspath = os.path.realpath(path)
return errorlog_abspath return errorlog_abspath




def _get_access_log_path(): def _get_access_log_path():
"""Get gunicorn access log path.""" """Get gunicorn access log path."""
access_log_path = os.path.join(settings.WORKSPACE, 'log/gunicorn/access.log')
access_log_path = os.path.join(settings.WORKSPACE, 'log/gunicorn/access.{}.log'.format(settings.PORT))
access_log_path = os.path.realpath(access_log_path) access_log_path = os.path.realpath(access_log_path)
return access_log_path return access_log_path




+ 1
- 1
mindinsight/scripts/stop.py View File

@@ -56,7 +56,7 @@ class Command(BaseCommand):
description = 'stop mindinsight service' description = 'stop mindinsight service'


cmd_regex = 'mindinsight.backend.application:APP' cmd_regex = 'mindinsight.backend.application:APP'
access_log_path = os.path.join('gunicorn', 'access.log')
access_log_path = os.path.join('gunicorn', 'access.{}.log'.format(settings.PORT))


def add_arguments(self, parser): def add_arguments(self, parser):
""" """


Loading…
Cancel
Save