mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 12:20:45 -03:30
Fix for KeyError when cache is empty, change cache key prefix for dev vs. prod.
Conflicts: awx/settings/production.py
This commit is contained in:
parent
a4f5b0ae71
commit
db3151a9dd
@ -300,7 +300,7 @@ class Host(CommonModelNameNotUnique):
|
||||
if summary_data[key] is None:
|
||||
rebuild_cache = True
|
||||
break
|
||||
if rebuild_cache:
|
||||
if rebuild_cache or not summary_data:
|
||||
summary_data = self.update_cached_values()
|
||||
summary_data_actual = dict(all_groups=summary_data['%s_all_groups' % self.id],
|
||||
groups=summary_data['%s_groups' % self.id],
|
||||
|
||||
@ -229,6 +229,7 @@ CACHES = {
|
||||
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
|
||||
'LOCATION': '127.0.0.1:11211',
|
||||
'TIMEOUT': 864000,
|
||||
'KEY_PREFIX': 'tower_dev',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -43,6 +43,9 @@ JOBOUTPUT_ROOT = '/var/lib/awx/job_status/'
|
||||
# The heartbeat file for the tower scheduler
|
||||
SCHEDULE_METADATA_LOCATION = '/var/lib/awx/.tower_cycle'
|
||||
|
||||
# Use different cache prefix for production vs. development.
|
||||
CACHES['default']['KEY_PREFIX'] = 'tower'
|
||||
|
||||
LOGGING['handlers']['rotating_file'] = {
|
||||
'level': 'WARNING',
|
||||
'class':'logging.handlers.RotatingFileHandler',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user