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()
def api_poll_ampel(): flag = ampelEvent.wait(REQUEST_TIMEOUT) if not flag: return error504() return jsonify(getStatus(AMPEL_FILE))