mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-09 23:37:54 +00:00
Make InfluxDB connection options configurable
This commit is contained in:
parent
a130e2215a
commit
99e2fad2b2
3 changed files with 19 additions and 11 deletions
|
|
@ -21,9 +21,9 @@ class NullStatCollector(StatCollector):
|
|||
|
||||
class InfluxStatCollector(StatCollector):
|
||||
@staticmethod
|
||||
async def connect():
|
||||
client = InfluxDBClient(host="influx", db="pluralkit")
|
||||
await client.create_database(db="pluralkit")
|
||||
async def connect(host: str, port: int, db: str):
|
||||
client = InfluxDBClient(host=host, port=port, db=db)
|
||||
await client.create_database(db=db)
|
||||
|
||||
return InfluxStatCollector(client)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue