summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Laszlo <tim.laszlo@gmail.com>2012-10-17 14:18:45 -0500
committerTim Laszlo <tim.laszlo@gmail.com>2012-10-17 14:18:50 -0500
commit7e4ee01d99e1ae775513f6f26767b457bf7656da (patch)
tree9c056fb8538ae2bf9d2cdc61462ac569d2ba90a1
parent3cf1f738c0a474e21ce56604ad874241584d59e9 (diff)
downloadbcfg2-7e4ee01d99e1ae775513f6f26767b457bf7656da.tar.gz
bcfg2-7e4ee01d99e1ae775513f6f26767b457bf7656da.tar.bz2
bcfg2-7e4ee01d99e1ae775513f6f26767b457bf7656da.zip
add a higher timeout for caching certain objects
-rw-r--r--src/lib/Bcfg2/Reporting/models.py2
-rwxr-xr-xtools/upgrade/1.3/migrate_dbstats.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/Bcfg2/Reporting/models.py b/src/lib/Bcfg2/Reporting/models.py
index b6549fc64..04bfac77a 100644
--- a/src/lib/Bcfg2/Reporting/models.py
+++ b/src/lib/Bcfg2/Reporting/models.py
@@ -381,7 +381,7 @@ class BaseEntry(models.Model):
newact = cls(**act_dict)
newact.save(hash_key=act_hash)
- cache.set(act_key, newact)
+ cache.set(act_key, newact, 60 * 60)
return newact
diff --git a/tools/upgrade/1.3/migrate_dbstats.py b/tools/upgrade/1.3/migrate_dbstats.py
index 888abc002..1bde1f0f3 100755
--- a/tools/upgrade/1.3/migrate_dbstats.py
+++ b/tools/upgrade/1.3/migrate_dbstats.py
@@ -84,7 +84,7 @@ def _migrate_transaction(inter, entries, fperms):
unkown_profile = cache.get("PROFILE_UNKNOWN")
if not unkown_profile:
unkown_profile, created = new_models.Group.objects.get_or_create(name="<<Unknown>>")
- cache.set("PROFILE_UNKNOWN", unkown_profile)
+ cache.set("PROFILE_UNKNOWN", unkown_profile, 60 * 60)
newint.profile = unkown_profile
groups = [unkown_profile]
super(new_models.Interaction, newint).save()