async def __aenter__(self): dsn = "postgres://root:@localhost:26257/guillotina?sslmode=disable" self.storage = CockroachStorage(dsn=dsn, name='db', pool_size=25, conn_acquire_timeout=0.1) await self.storage.initialize(self.loop) return self.storage
async def __aenter__(self): dsn = "postgres://root:@{}:{}/guillotina?sslmode=disable".format( self.db[0], self.db[1]) self.storage = CockroachStorage(dsn=dsn, name="db", pool_size=25, conn_acquire_timeout=0.1) await self.storage.initialize(self.loop) return self.storage