chore: fixes mongodb memory server timeout issues
This commit is contained in:
@@ -35,6 +35,12 @@ export const connect: Connect = async function connect(
|
||||
try {
|
||||
this.connection = (await mongoose.connect(urlToConnect, connectionOptions)).connection
|
||||
|
||||
// If we are running a replica set with MongoDB Memory Server,
|
||||
// wait until the replica set elects a primary before proceeding
|
||||
if (this.mongoMemoryServer) {
|
||||
await new Promise((resolve) => setTimeout(resolve, 2000))
|
||||
}
|
||||
|
||||
const client = this.connection.getClient()
|
||||
|
||||
if (!client.options.replicaSet) {
|
||||
|
||||
@@ -405,12 +405,6 @@ export type Config = {
|
||||
|
||||
/** Set account profile picture. Options: gravatar, default or a custom React component. */
|
||||
avatar?: 'default' | 'gravatar' | React.ComponentType<any>
|
||||
/**
|
||||
* Specify an absolute path for where to store the built Admin panel bundle used in production.
|
||||
*
|
||||
* @default "/build"
|
||||
* */
|
||||
buildPath?: string
|
||||
/**
|
||||
* Add extra and/or replace built-in components with custom components
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user