Skip to content

Commit

Permalink
iss #47: ignore influxdb errors
Browse files Browse the repository at this point in the history
  • Loading branch information
maizy committed Feb 17, 2019
1 parent 723f9b5 commit 6368287
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ambient7-arduino/serial2influxdb/serial2influxdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ def main(args):

data = collect_data(key, raw_value, tags)
if data is not None:
influxdb_client.write_points(data)
try:
influxdb_client.write_points(data)
except Exception as e:
logger.warning("Unable to send data to influxdb: %s", e)
except KeyboardInterrupt:
return 1
return 0
Expand Down

0 comments on commit 6368287

Please sign in to comment.