示例#1
0
文件: base.py 项目: ruslantum/st2
 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
0
文件: base.py 项目: sarkartanzil/st2
 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)
示例#3
0
文件: queries.py 项目: zwunix/st2
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
示例#4
0
    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)