예제 #1
0
def api_poll_ledticker():
	ticker = ledticker.LedTicker(LEDTICKER_FILE)
	flag = False
	while not ticker.items_available():
		flag = ledtickerEvent.wait(REQUEST_TIMEOUT)

		if not flag:
			return error504()

	return ticker.get_output()
예제 #2
0
def api_poll_ampel():
	flag = ampelEvent.wait(REQUEST_TIMEOUT)
	if not flag:
		return error504()
	return jsonify(getStatus(AMPEL_FILE))