gunicorn.config.py 391 B

1234567891011121314
  1. import os
  2. # 日志配置
  3. # 本地日志存储路径
  4. log_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "logs")
  5. if not os.path.exists(log_path):
  6. os.makedirs(log_path)
  7. loglevel = "info"
  8. accesslog = os.path.join(log_path, 'access.log')
  9. errorlog = os.path.join(log_path, 'error.log')
  10. workers = 5
  11. # 设置工作模式为协程
  12. worker_class = "gevent"
  13. bind = "0.0.0.0:5001"