Commit 1fa7f538 by Clinton Blackburn

Reverted changes to ecommerce-related gunicorn files

#2388 and #2393 introduced changes to gunicorn.py that prevent these services from starting.

ECOM-2594
parent 1b23f9d9
......@@ -9,15 +9,4 @@ pythonpath = "{{ '{{' }} {{ role_name }}_code_dir }}"
workers = {{ '{{' }} {{ role_name|upper }}_GUNICORN_WORKERS }}
worker_class = "{{ '{{' }} {{ role_name|upper }}_GUNICORN_WORKER_CLASS }}"
def post_fork(server, worker):
"""
Close the cache so that newly forked workers cannot accidentally share the
socket with the processes they were forked from. This prevents a race
condition in which one worker could get a cache response intended for
another worker.
"""
from django.core.cache import cache
if hasattr(cache, 'close'):
cache.close()
{{ '{{' }} {{ role_name|upper }}_GUNICORN_EXTRA_CONF }}
......@@ -9,15 +9,4 @@ pythonpath = "{{ ecommerce_code_dir }}"
workers = {{ ECOMMERCE_GUNICORN_WORKERS }}
worker_class = "{{ ECOMMERCE_GUNICORN_WORKER_CLASS }}"
def post_fork(server, worker):
"""
Close the cache so that newly forked workers cannot accidentally share the
socket with the processes they were forked from. This prevents a race
condition in which one worker could get a cache response intended for
another worker.
"""
from django.core.cache import cache
if hasattr(cache, 'close'):
cache.close()
{{ ECOMMERCE_GUNICORN_EXTRA_CONF }}
......@@ -9,15 +9,4 @@ pythonpath = "{{ programs_code_dir }}"
workers = {{ PROGRAMS_GUNICORN_WORKERS }}
worker_class = "{{ PROGRAMS_GUNICORN_WORKER_CLASS }}"
def post_fork(server, worker):
"""
Close the cache so that newly forked workers cannot accidentally share the
socket with the processes they were forked from. This prevents a race
condition in which one worker could get a cache response intended for
another worker.
"""
from django.core.cache import cache
if hasattr(cache, 'close'):
cache.close()
{{ PROGRAMS_GUNICORN_EXTRA_CONF }}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment