Return influx data entry
This commit is contained in:
parent
b202889766
commit
0c850e7ef2
@ -59,11 +59,11 @@ for account in accounts:
|
||||
date = strftime("%Y-%m-%d")
|
||||
time = strftime("%H:%M:%S")
|
||||
timestamp = date + "T" + time + "Z"
|
||||
# write_api = client.write_api(write_options=SYNCHRONOUS)
|
||||
# point = influxdb_client.Point("unread_emails").time(timestamp).tag("account", account)\
|
||||
# .field("count", unread_messages)
|
||||
# write_api.write(bucket="personal_data",
|
||||
# org=config['DB_ORG'], record=point)
|
||||
write_api = client.write_api(write_options=SYNCHRONOUS)
|
||||
point = influxdb_client.Point("unread_emails").time(timestamp).tag("account", account)\
|
||||
.field("count", unread_messages)
|
||||
write_api.write(bucket="personal_data",
|
||||
org=config['DB_ORG'], record=point)
|
||||
print(message)
|
||||
|
||||
print(
|
||||
|
Loading…
Reference in New Issue
Block a user