From 718d20761285dd52780f1874bd912964cfc1ef95 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Tue, 24 Nov 2020 12:40:01 +0100 Subject: [PATCH] api/alfredX: Remove InfluxDB test code This reverts commits: ccb5bb020ff2 ("api/alfredX: Update code for InfluxDB test") 396d5a251ec8 ("api/alfredX: Add code for InfluxDB test") Signed-off-by: Adrian Schmutzler --- ffmap/web/api.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/ffmap/web/api.py b/ffmap/web/api.py index e56fbd0..0c4c23d 100755 --- a/ffmap/web/api.py +++ b/ffmap/web/api.py @@ -154,14 +154,6 @@ def alfred(): if request.method == 'POST': try: alfred_data = request.get_json() - # send data to christiand to test grafana/influxdb - try: - rcd = requests.post(url = "http://homeserver.dresel.it/freifunkgrafana.php", data = alfred_data.get("64", {}), timeout=3) - writelog(CONFIG["debug_dir"] + "/chrisd.txt", "alfred: %s" % (rcd.text)) - except requests.Timeout: - pass - except requests.ConnectionError: - pass except Exception as e: writelog(CONFIG["debug_dir"] + "/fail_alfred.txt", "{} - {}".format(request.environ['REMOTE_ADDR'],'JSON parsing failed')) writefulllog("Warning: Error converting ALFRED data to JSON:\n__%s" % (request.get_data(True,True).replace("\n", "\n__"))) @@ -215,14 +207,6 @@ def alfred2(): if request.method == 'POST': try: alfred_data = request.get_json() - # send data to christiand to test grafana/influxdb - try: - rcd = requests.post(url = "http://homeserver.dresel.it/freifunkgrafana.php", data = alfred_data, timeout=3) - writelog(CONFIG["debug_dir"] + "/chrisd.txt", "alfred2: %s" % (rcd.text)) - except requests.Timeout: - pass - except requests.ConnectionError: - pass except Exception as e: writelog(CONFIG["debug_dir"] + "/fail_alfred2.txt", "{} - {}".format(request.environ['REMOTE_ADDR'],'JSON parsing failed')) writefulllog("Warning: Error converting ALFRED2 data to JSON:\n__%s\n__%s" % (e, request.get_data(True,True).replace("\n", "\n__")))