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:
		| @@ -558,13 +558,11 @@ async def setup_db(app, loop): | |||||||
|     app.ctx.mask = None |     app.ctx.mask = None | ||||||
|     app.ctx.db = AsyncIOMotorClient(MONGO_URI).get_default_database() |     app.ctx.db = AsyncIOMotorClient(MONGO_URI).get_default_database() | ||||||
|     app.ctx.coll = app.ctx.db[MONGO_COLLECTION] |     app.ctx.coll = app.ctx.db[MONGO_COLLECTION] | ||||||
|     app.ctx.coll.create_index([ |     app.ctx.coll.create_index( | ||||||
|         ("@timestamp", pymongo.ASCENDING)]) |         "@timestamp", expireAfterSeconds=TTL_DAYS * 60 * 60 * 24) | ||||||
|     app.ctx.coll.create_index([ |     app.ctx.coll.create_index([ | ||||||
|         ("source", pymongo.ASCENDING), |         ("source", pymongo.ASCENDING), | ||||||
|         ("@timestamp", pymongo.ASCENDING)], unique=True) |         ("@timestamp", pymongo.ASCENDING)], unique=True) | ||||||
|     app.ctx.coll.create_index( |  | ||||||
|         "@timestamp", expireAfterSeconds=TTL_DAYS*60*60*24) |  | ||||||
|     app.ctx.last_frame = None |     app.ctx.last_frame = None | ||||||
|     app.ctx.event_frame = asyncio.Event() |     app.ctx.event_frame = asyncio.Event() | ||||||
|     app.ctx.event_id = None |     app.ctx.event_id = None | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user