From 7e4ee01d99e1ae775513f6f26767b457bf7656da Mon Sep 17 00:00:00 2001 From: Tim Laszlo Date: Wed, 17 Oct 2012 14:18:45 -0500 Subject: add a higher timeout for caching certain objects --- src/lib/Bcfg2/Reporting/models.py | 2 +- tools/upgrade/1.3/migrate_dbstats.py | 2 +- 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="<>") - 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() -- cgit v1.2.3-1-g7c22