예제 #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)