gunicorn_config.py 607 B

12345678910111213141516171819202122232425262728293031
  1. ## explorer gunicorn configuration
  2. # Bind address and port
  3. bind = "127.0.0.1:8000"
  4. # Number of worker processes
  5. workers = 1
  6. # Number of threads per worker
  7. threads = 2
  8. # Type of worker class
  9. worker_class = "gthread"
  10. # Maximum number of pending connections
  11. backlog = 2048
  12. # Timeout for workers (in seconds)
  13. timeout = 30
  14. # PID file location
  15. pidfile = "gunicorn.pid"
  16. # Log configuration
  17. import os
  18. environment = os.getenv("FLASK_ENV", "testnet")
  19. log_home = os.getenv("LOG_HOME", "/tmp")
  20. log_path = os.path.join(log_home, environment, "app.log")
  21. accesslog = log_path
  22. errorlog = log_path
  23. loglevel = "info"