
import os

from django.core.wsgi import get_wsgi_application

from raven.contrib.django.raven_compat.middleware.wsgi import Sentry


os.environ.setdefault("DJANGO_SETTINGS_MODULE", "standup.settings")

application = Sentry(get_wsgi_application())


import os

from django.core.cache.backends.memcached import BaseMemcachedCache
from django.core.wsgi import get_wsgi_application

from raven.contrib.django.raven_compat.middleware.wsgi import Sentry


# Fix django closing connection to MemCachier after every request (#11331)
# per the MemCachier docs.
BaseMemcachedCache.close = lambda self, **kwargs: None

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "standup.settings")

application = Sentry(get_wsgi_application())

Add monkeypatch to prevent connection closing for memcachier
Add monkeypatch to prevent connection closing for memcachier

  
  import os
  
+ from django.core.cache.backends.memcached import BaseMemcachedCache
  from django.core.wsgi import get_wsgi_application
  
  from raven.contrib.django.raven_compat.middleware.wsgi import Sentry
  
  
+ # Fix django closing connection to MemCachier after every request (#11331)
+ # per the MemCachier docs.
+ BaseMemcachedCache.close = lambda self, **kwargs: None
+ 
  os.environ.setdefault("DJANGO_SETTINGS_MODULE", "standup.settings")
  
  application = Sentry(get_wsgi_application())
  
Add monkeypatch to prevent connection closing for memcachier
## Code Before:

import os

from django.core.wsgi import get_wsgi_application

from raven.contrib.django.raven_compat.middleware.wsgi import Sentry


os.environ.setdefault("DJANGO_SETTINGS_MODULE", "standup.settings")

application = Sentry(get_wsgi_application())

## Instruction:
Add monkeypatch to prevent connection closing for memcachier
## Code After:

import os

from django.core.cache.backends.memcached import BaseMemcachedCache
from django.core.wsgi import get_wsgi_application

from raven.contrib.django.raven_compat.middleware.wsgi import Sentry


# Fix django closing connection to MemCachier after every request (#11331)
# per the MemCachier docs.
BaseMemcachedCache.close = lambda self, **kwargs: None

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "standup.settings")

application = Sentry(get_wsgi_application())
