From 777d8a84e0f9e7529510d6c72ed3e6d3e8d1eeaa Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Thu, 9 Jun 2022 15:40:50 -0700 Subject: [PATCH] migration_manager: timestamp cache result after obtained, not before --- services/migration_manager/migration_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/migration_manager/migration_manager.py b/services/migration_manager/migration_manager.py index cc9c0494..01d4b6fa 100644 --- a/services/migration_manager/migration_manager.py +++ b/services/migration_manager/migration_manager.py @@ -32,8 +32,8 @@ def wrapped(self, *args, **kwargs): tic = self.lastrun toc = time.time() if (toc - tic) > self.timeout or self.cache is None: - self.lastrun = toc self.cache = self.func(*args, **kwargs) + self.lastrun = time.time() return self.cache