Skip to content

Commit

Permalink
在docker中启动多个gunicorn进程时,偶发异常"File exists: '/root/logs/nacos/',导致服务启动失…
Browse files Browse the repository at this point in the history
…败。增加exist_ok=True,避免异常
  • Loading branch information
projoy committed Jul 18, 2024
1 parent 8c8977d commit 4bacc43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nacos/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def initLog(self, logDir, log_level, log_rotation_backup_count):
if not logDir.endswith(os.path.sep):
logDir += os.path.sep
if not os.path.exists(logDir):
os.makedirs(logDir)
os.makedirs(logDir, exist_ok=True)

if log_rotation_backup_count is None:
log_rotation_backup_count = 7
Expand Down

0 comments on commit 4bacc43

Please sign in to comment.