本文整理匯總了Python中st2common.persistence.executionstate.ActionExecutionState.delete方法的典型用法代碼示例。如果您正苦於以下問題:Python ActionExecutionState.delete方法的具體用法?Python ActionExecutionState.delete怎麽用?Python ActionExecutionState.delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類st2common.persistence.executionstate.ActionExecutionState
的用法示例。
在下文中一共展示了ActionExecutionState.delete方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _delete_state_object
# 需要導入模塊: from st2common.persistence.executionstate import ActionExecutionState [as 別名]
# 或者: from st2common.persistence.executionstate.ActionExecutionState import delete [as 別名]
def _delete_state_object(self, query_context):
state_db = ActionExecutionState.get_by_id(query_context.id)
if state_db is not None:
try:
ActionExecutionState.delete(state_db)
except:
LOG.exception('Failed clearing state object: %s', state_db)
示例2: remove_query
# 需要導入模塊: from st2common.persistence.executionstate import ActionExecutionState [as 別名]
# 或者: from st2common.persistence.executionstate.ActionExecutionState import delete [as 別名]
def remove_query(liveaction_id):
state_db = ActionExecutionState.query(execution_id=liveaction_id)
if not state_db:
return False
ActionExecutionState.delete(state_db, publish=False, dispatch_trigger=False)
return True