Do not create timestamp index twice
All checks were successful
continuous-integration/drone Build is passing
All checks were successful
continuous-integration/drone Build is passing
This commit is contained in:
parent
e7da187e18
commit
fd3557c5da
@ -558,13 +558,11 @@ 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([
|
||||
("@timestamp", pymongo.ASCENDING)])
|
||||
app.ctx.coll.create_index(
|
||||
"@timestamp", expireAfterSeconds=TTL_DAYS * 60 * 60 * 24)
|
||||
app.ctx.coll.create_index([
|
||||
("source", pymongo.ASCENDING),
|
||||
("@timestamp", pymongo.ASCENDING)], unique=True)
|
||||
app.ctx.coll.create_index(
|
||||
"@timestamp", expireAfterSeconds=TTL_DAYS*60*60*24)
|
||||
app.ctx.last_frame = None
|
||||
app.ctx.event_frame = asyncio.Event()
|
||||
app.ctx.event_id = None
|
||||
|
Loading…
Reference in New Issue
Block a user