chore: fixes mongodb memory server timeout issues

This commit is contained in:
James
2024-03-18 12:17:43 -04:00
parent 152eea3cb8
commit 2cf72aea81
4 changed files with 6 additions and 87 deletions

View File

@@ -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) {

View File

@@ -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
*