Skip to content

Commit

Permalink
fix(integrations): Remove duplicated code from gunicorn_conf.py
Browse files Browse the repository at this point in the history
Signed-off-by: Diwank Singh Tomer <[email protected]>
  • Loading branch information
creatorrr committed Nov 29, 2024
1 parent 14e4c3c commit a0ce527
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions integrations-service/gunicorn_conf.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import multiprocessing
import os

TESTING = os.getenv("TESTING", "false").lower() == "true"
DEBUG = os.getenv("DEBUG", "false").lower() == "true"
import os

TESTING = os.getenv("TESTING", "false").lower() == "true"
DEBUG = os.getenv("DEBUG", "false").lower() == "true"

Expand All @@ -23,32 +19,6 @@
preload_app = False


def when_ready(server):
"""Run when server is ready to handle requests."""
# Ensure proper permissions for any required directories
for directory in ["logs", "run"]:
path = os.path.join(os.getcwd(), directory)
if not os.path.exists(path):
os.makedirs(path, mode=0o755)


def on_starting(server):
"""Run when server starts."""
server.log.setup(server.app.cfg)


def worker_exit(server, worker):
"""Clean up on worker exit."""
server.log.info(f"Worker {worker.pid} exiting gracefully")


loglevel = "info"
graceful_timeout = 30
max_requests = 1000
max_requests_jitter = 50
preload_app = False


def when_ready(server):
"""Run when server is ready to handle requests."""
# Ensure proper permissions for any required directories
Expand Down

0 comments on commit a0ce527

Please sign in to comment.