Esempio n. 1
0
def delete_event_trigger(event_trigger):
    db_api.delete_event_trigger(event_trigger['id'])

    trigs = db_api.get_event_triggers(insecure=True,
                                      exchange=event_trigger['exchange'],
                                      topic=event_trigger['topic'])
    events = set([t.event for t in trigs])

    # NOTE(kong): Send RPC message within the db transaction, rollback if
    # any error occurs.
    rpc.get_event_engine_client().delete_event_trigger(event_trigger,
                                                       list(events))
Esempio n. 2
0
def delete_event_trigger(event_trigger):
    db_api.delete_event_trigger(event_trigger['id'])

    trigs = db_api.get_event_triggers(
        insecure=True,
        exchange=event_trigger['exchange'],
        topic=event_trigger['topic']
    )
    events = set([t.event for t in trigs])

    # NOTE(kong): Send RPC message within the db transaction, rollback if
    # any error occurs.
    rpc.get_event_engine_client().delete_event_trigger(
        event_trigger,
        list(events)
    )