from gunicorn.app.base import BaseApplication from backend.app.bootstrap.factory import create_app class LedgerApplication(BaseApplication): def load_config(self): settings = { "bind": "0.0.0.0:8080", "control_socket_disable": True, "workers": 4, "threads": 8, "worker_class": "gthread", "preload_app": True, "timeout": 20, "graceful_timeout": 10, "keepalive": 5, "backlog": 128, "max_requests": 1000, "max_requests_jitter": 100, "accesslog": "-", "errorlog": "-", } for key, value in settings.items(): self.cfg.set(key, value) def load(self): return create_app() if __name__ == "__main__": LedgerApplication().run()