This commit is contained in:
parent
79151695f8
commit
6606ec0699
@ -40,8 +40,9 @@ async def on_message(message: IncomingMessage):
|
|||||||
'fields': {'probability': msg_json['probability']}
|
'fields': {'probability': msg_json['probability']}
|
||||||
}
|
}
|
||||||
async with InfluxDBClient(username=config.INFLUXDB_USERNAME, password=config.INFLUXDB_PASSWORD,
|
async with InfluxDBClient(username=config.INFLUXDB_USERNAME, password=config.INFLUXDB_PASSWORD,
|
||||||
host=config.INFLUXDB_HOST, port=config.INFLUXDB_PORT, ssl=False) as client:
|
host=config.INFLUXDB_HOST, port=config.INFLUXDB_PORT, ssl=False,
|
||||||
await client.create_database(db=config.INFLUXDB_DB)
|
database=config.INFLUXDB_DB) as client:
|
||||||
|
await client.create_database(config.INFLUXDB_DB)
|
||||||
await client.write(point)
|
await client.write(point)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user