Skip to content

Commit

Permalink
added query_api and write_api to the bucket(db) code in backends/infl…
Browse files Browse the repository at this point in the history
…uxdb2/client.py
  • Loading branch information
AbhigyaShridhar committed Apr 13, 2022
1 parent d88fe65 commit 70289c2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openwisp_monitoring/db/backends/influxdb2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def create_database(self):
logger.debug(f'Created InfluxDB2 bucket "{self.db_name}"')
else:
logger.debug(f'Bucket named "{self.db_name}" found')
self.write_api = self.db.write_api(write_options=SYNCHRONOUS)
self.query_api = self.db.query_api()

@retry
def drop_database(self):
Expand Down

0 comments on commit 70289c2

Please sign in to comment.