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)
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
def _delete_state_object(self, query_context): state_db = None try: state_db = ActionExecutionState.get_by_id(query_context.id) except db_exc.StackStormDBObjectNotFoundError: pass if state_db is not None: try: LOG.info('Clearing state object: %s', state_db) ActionExecutionState.delete(state_db) except: LOG.exception('Failed clearing state object: %s', state_db)