Commit 7e33b4fc authored by Łukasz Nowak's avatar Łukasz Nowak

Fix "Follow up "slapos_cloud: Introduce SlapOSCacheMixin"

parent df2f22d0
Pipeline #20185 failed with stage
in 0 seconds
...@@ -108,13 +108,13 @@ def SoftwareInstance_renameAndRequestDestroy(self, REQUEST=None): ...@@ -108,13 +108,13 @@ def SoftwareInstance_renameAndRequestDestroy(self, REQUEST=None):
for name in [title, new_title]: for name in [title, new_title]:
# reset request cache # reset request cache
key = '_'.join([instance_tree, name]) key = '_'.join([instance_tree, name])
instance_tree.setLastData({}, key=key) self.setLastData({}, key=key)
# Them call bang to enforce tree to reprocess. # Them call bang to enforce tree to reprocess.
timestamp = str(int(self.getModificationDate())) timestamp = str(int(self.getModificationDate()))
key = "%s_bangstamp" % self.getReference() key = "%s_bangstamp" % self.getReference()
if (self.portal_slap._getLastData(key) != timestamp): if (self.getLastData(key) != timestamp):
self.bang(bang_tree=True, comment="Instance was destroyed.") self.bang(bang_tree=True, comment="Instance was destroyed.")
self.setLastData(str(int(self.getModificationDate())), key=key) self.setLastData(str(int(self.getModificationDate())), key=key)
...@@ -152,13 +152,13 @@ def SoftwareInstance_renameAndRequestStop(self, REQUEST=None): ...@@ -152,13 +152,13 @@ def SoftwareInstance_renameAndRequestStop(self, REQUEST=None):
for name in [title, new_title]: for name in [title, new_title]:
# reset request cache # reset request cache
key = '_'.join([instance_tree, name]) key = '_'.join([instance_tree, name])
instance_tree.setLastData({}, key=key) self.setLastData({}, key=key)
# Them call bang to enforce tree to reprocess. # Them call bang to enforce tree to reprocess.
timestamp = str(int(self.getModificationDate())) timestamp = str(int(self.getModificationDate()))
key = "%s_bangstamp" % self.getReference() key = "%s_bangstamp" % self.getReference()
if (self.portal_slap._getLastData(key) != timestamp): if (self.getLastData(key) != timestamp):
self.bang(bang_tree=True, comment="Instance was renamed.") self.bang(bang_tree=True, comment="Instance was renamed.")
self.setLastData(str(int(self.getModificationDate())), key=key) self.setLastData(str(int(self.getModificationDate())), key=key)
......
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