Commit d1c03593 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_cloud: Bang after request destroy, to ensure the whole Hosting Subscription is processed

parent fa0ebacf
......@@ -86,3 +86,11 @@ def SoftwareInstance_renameAndRequestDestroy(self, REQUEST=None):
# reset request cache
key = '_'.join([hosting_subscription, name])
self.getPortalObject().portal_slap._storeLastData(key, {})
# Them call bang to enforce tree to reprocess.
timestamp = str(int(self.getModificationDate()))
key = "%s_bangstamp" % self.getReference()
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())))
......@@ -120,6 +120,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......
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