From 40ef30a91445771de28d2a9d2256e0c127c9a598 Mon Sep 17 00:00:00 2001 From: chris meyers Date: Thu, 17 May 2018 13:35:35 -0400 Subject: [PATCH] reduce chance of collision on cache namespace --- awx/settings/development.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/awx/settings/development.py b/awx/settings/development.py index 4a2bd1aa8d..9cf0d92179 100644 --- a/awx/settings/development.py +++ b/awx/settings/development.py @@ -10,6 +10,7 @@ import copy import sys import traceback import random +import uuid # Centos-7 doesn't include the svg mime type # /usr/lib64/python/mimetypes.py @@ -26,7 +27,7 @@ if "pytest" in sys.modules: CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', - 'LOCATION': 'unique-{}'.format(random.randint(0, sys.maxint)), + 'LOCATION': 'unique-{}'.format(str(uuid.uuid4())), }, }