Esempio n. 1
0
def api_outage_fix():
    set_outage(False)

    control = get_control()
    emit('control', control, namespace='/app', broadcast=True)

    return success(get_state())
Esempio n. 2
0
def api_set_data_frequency():
    frequency = request.args.get('frequency', 1)

    set_data_frequency(frequency)

    control = get_control()
    emit('control', control, namespace='/app', broadcast=True)

    return success(get_state())
Esempio n. 3
0
def api_set_clock_skew():
    skew = request.args.get('skew', 1)

    set_clock_skew(skew)

    control = get_control()
    emit('control', control, namespace='/app', broadcast=True)

    return success(get_state())
Esempio n. 4
0
def api_outage_strategy():
    strategy = request.args.get('strategy', 'immediate')

    set_outage_strategy(strategy)

    control = get_control()
    emit('control', control, namespace='/app', broadcast=True)

    return success(get_state())
def sockect_connect():
    increment_connection_count()
    increment_requests_per_second()

    state = get_state()
    emit('state', state, namespace='/presentation', broadcast=True)

    control = get_control()
    emit('control', control, namespace='/app', broadcast=True)
Esempio n. 6
0
def api_state():
    state = get_state()
    return success(state)
Esempio n. 7
0
def api_reset_max_requests():
    reset_max_requests_per_second()
    state = get_state()
    return success(state)
Esempio n. 8
0
def api_reset_counter():
    reset_all()
    state = get_state()
    return success(state)
Esempio n. 9
0
def hello():
    state = get_state()
    return render_template('index.html', state=state)
def socket_disconnect():
    decrement_connection_count()
    state = get_state()
    emit('state', state, namespace='/presentation', broadcast=True)