Example #1
0
def update_entity_full(entity_id):
    """Perform some update operations on entities."""
    query = db.session.query(Entity).filter(Entity.id == entity_id)
    entity = query.first()
    generate_entity_references(entity)
    reindex_entity(entity)
    Alert.dedupe(entity.id)
Example #2
0
def update_entity_full(entity_id):
    """Perform some update operations on entities."""
    query = db.session.query(Entity).filter(Entity.id == entity_id)
    entity = query.first()
    generate_entity_references(entity)
    reindex_entity(entity)
    Alert.dedupe(entity.id)
Example #3
0
def update_entity_full(entity_id):
    """Perform update operations on entities."""
    query = db.session.query(Entity).filter(Entity.id == entity_id)
    entity = query.first()
    if entity is None:
        log.error("No entity with ID: %r", entity_id)
        return
    Alert.dedupe(entity.id)
    index_entity(entity)
Example #4
0
def update_entity_full(entity_id):
    """Perform update operations on entities."""
    query = db.session.query(Entity).filter(Entity.id == entity_id)
    entity = query.first()
    generate_entity_references(entity)
    with graph.transaction() as tx:
        graph.load_entity(tx, entity)
        graph.generate_paths(tx, entity)
    reindex_entity(entity)
    Alert.dedupe(entity.id)
Example #5
0
def update_entity_full(entity_id):
    """Perform update operations on entities."""
    query = db.session.query(Entity).filter(Entity.id == entity_id)
    entity = query.first()
    generate_entity_references(entity)
    with graph.transaction() as tx:
        graph.load_entity(tx, entity)
        graph.generate_paths(tx, entity)
    reindex_entity(entity)
    Alert.dedupe(entity.id)
Example #6
0
def check_alerts():
    """Go through all alerts."""
    Alert.dedupe()
    db.session.commit()
    for alert_id in Alert.all_ids():
        check_alert(alert_id)