Set app.ctx.mask during startup

master
Lauri Võsandi 2 months ago
parent 15e0ee5bc5
commit 4d2497fd0d
  1. 1
      camdetect.py

@ -548,6 +548,7 @@ def handler(signum, frame):
@app.listener("before_server_start")
async def setup_db(app, loop):
app.ctx.mask = None
app.ctx.db = AsyncIOMotorClient(MONGO_URI).get_default_database()
app.ctx.coll = app.ctx.db[MONGO_COLLECTION]
app.ctx.coll.create_index([

Loading…
Cancel
Save