Rearrage Write Query
This commit is contained in:
parent
8d11f61dc7
commit
b073c37db0
@ -88,8 +88,8 @@ def add_time():
|
||||
print(dt)
|
||||
print()
|
||||
write_api = client.write_api(write_options=SYNCHRONOUS)
|
||||
p = influxdb_client.Point("2016_odyssey").time(timestamp).field("odometer", float(odometer)).tag("oilhealth", oilhealth)\
|
||||
.tag("fuel", fuel).field("fuelcost", fuelcost).tag("winter", winter)
|
||||
p = influxdb_client.Point("2016_odyssey").time(timestamp).tag("oilhealth", oilhealth)\
|
||||
.tag("fuel", fuel).field("fuelcost", fuelcost).tag("winter", winter).field("odometer", float(odometer))
|
||||
write_api.write(bucket="gas", org=config['DB_ORG'], record=p)
|
||||
print ("Submitting data to DB: {0}".format(json_body))
|
||||
#client.write_points(json_body)
|
||||
|
Loading…
Reference in New Issue
Block a user