fix: CacheAdapter does not connect when using a CacheAdapter with a JSON config (#8633)
This commit is contained in:
@@ -94,10 +94,10 @@ class ParseServer {
|
||||
const {
|
||||
databaseController,
|
||||
hooksController,
|
||||
cacheController,
|
||||
cloud,
|
||||
security,
|
||||
schema,
|
||||
cacheAdapter,
|
||||
liveQueryController,
|
||||
} = this.config;
|
||||
try {
|
||||
@@ -112,8 +112,11 @@ class ParseServer {
|
||||
if (schema) {
|
||||
startupPromises.push(new DefinedSchemas(schema, this.config).execute());
|
||||
}
|
||||
if (cacheAdapter?.connect && typeof cacheAdapter.connect === 'function') {
|
||||
startupPromises.push(cacheAdapter.connect());
|
||||
if (
|
||||
cacheController.adapter?.connect &&
|
||||
typeof cacheController.adapter.connect === 'function'
|
||||
) {
|
||||
startupPromises.push(cacheController.adapter.connect());
|
||||
}
|
||||
startupPromises.push(liveQueryController.connect());
|
||||
await Promise.all(startupPromises);
|
||||
|
||||
Reference in New Issue
Block a user