Add CouchDB stuffs
This commit is contained in:
13
vona/db/__init__.py
Normal file
13
vona/db/__init__.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import vona.config as config
|
||||
import pycouchdb
|
||||
import os
|
||||
|
||||
# NOTE: We don't do anything with the DB currently.
|
||||
|
||||
try:
|
||||
server = pycouchdb.Server(config.db.url)
|
||||
except Exception as e:
|
||||
print(f"[FATL] Could not connect to DB: {e}")
|
||||
os._exit(1)
|
||||
|
||||
print(f"[INFO] CouchDB version {server.info()['version']}")
|
||||
Reference in New Issue
Block a user