MCPcopy Create free account
hub / github.com/StackStorm/st2 / delete

Method delete

st2common/st2common/persistence/base.py:254–271  ·  view source on GitHub ↗
(cls, model_object, publish=True, dispatch_trigger=True)

Source from the content-addressed store, hash-verified

252
253 @classmethod
254 def delete(cls, model_object, publish=True, dispatch_trigger=True):
255 persisted_object = cls._get_impl().delete(model_object)
256
257 # Publish internal event on the message bus
258 if publish:
259 try:
260 cls.publish_delete(model_object)
261 except Exception:
262 LOG.exception("Publish failed.")
263
264 # Dispatch trigger
265 if dispatch_trigger:
266 try:
267 cls.dispatch_delete_trigger(model_object)
268 except Exception:
269 LOG.exception("Trigger dispatch failed.")
270
271 return persisted_object
272
273 ####################################################
274 # Internal event bus message publish related methods

Calls 3

_get_implMethod · 0.45
publish_deleteMethod · 0.45