def update_tracker_state(tracker, state):
    session = current_app.db.session('relengapi')
    log.info('updating tracker with id: {} to state: {}'.format(tracker.id, state))
    try:
        tracker.state = state
        session.commit()
    except sa.exc.IntegrityError:
        session.rollback()
def update_tracker_state(tracker, state):
    session = current_app.db.session('relengapi')
    log.info('updating tracker with id: {} to state: {}'.format(tracker.id, state))
    try:
        tracker.state = state
        session.commit()
    except sa.exc.IntegrityError:
        session.rollback()