Commit acfb7b53 authored by Łukasz Nowak's avatar Łukasz Nowak

Follow up "slapos_cloud: Introduce SlapOSCacheMixin"

The c647aab4 dropped _storeLastData, so
follow-up changes here.
parent 4d564274
Pipeline #19964 failed with stage
in 0 seconds
......@@ -108,7 +108,7 @@ def SoftwareInstance_renameAndRequestDestroy(self, REQUEST=None):
for name in [title, new_title]:
# reset request cache
key = '_'.join([instance_tree, name])
self.getPortalObject().portal_slap._storeLastData(key, {})
instance_tree.setLastData({}, key=key)
# Them call bang to enforce tree to reprocess.
timestamp = str(int(self.getModificationDate()))
......@@ -116,7 +116,7 @@ def SoftwareInstance_renameAndRequestDestroy(self, REQUEST=None):
if (self.portal_slap._getLastData(key) != timestamp):
self.bang(bang_tree=True, comment="Instance was destroyed.")
self.portal_slap._storeLastData(key, str(int(self.getModificationDate())))
self.setLastData(str(int(self.getModificationDate())), key=key)
def SoftwareInstance_renameAndRequestStop(self, REQUEST=None):
......@@ -152,7 +152,7 @@ def SoftwareInstance_renameAndRequestStop(self, REQUEST=None):
for name in [title, new_title]:
# reset request cache
key = '_'.join([instance_tree, name])
self.getPortalObject().portal_slap._storeLastData(key, {})
instance_tree.setLastData({}, key=key)
# Them call bang to enforce tree to reprocess.
timestamp = str(int(self.getModificationDate()))
......@@ -160,7 +160,7 @@ def SoftwareInstance_renameAndRequestStop(self, REQUEST=None):
if (self.portal_slap._getLastData(key) != timestamp):
self.bang(bang_tree=True, comment="Instance was renamed.")
self.portal_slap._storeLastData(key, str(int(self.getModificationDate())))
self.setLastData(str(int(self.getModificationDate())), key=key)
def HostingSubscription_checkInstanceTreeMigrationConsistency(self, fixit=False):
......
  • Side node for myself: It seems there isn't a need for those scripts be on External Method anymore, and/or it would be interesting API-fy this "set on specific key" thing, since it can is clear duplication on the definition of what the key/purpose it is.

Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment