Add MariaDB queue table. Fix Bugs
This commit is contained in:
Vendored
+2
-8
@@ -1,4 +1,4 @@
|
||||
import grabMariaDBClient, { mariadbClientCacheKey, } from "../functions/grab-mariadb-client";
|
||||
import grabMariaDBClient from "../functions/grab-mariadb-client";
|
||||
/**
|
||||
* Resolve a shared MariaDB client. Prefer the global client so schema sync
|
||||
* and CRUD do not open a new connection per query.
|
||||
@@ -7,13 +7,7 @@ export function resolveClient(config) {
|
||||
if (!config) {
|
||||
return global.MARIADB_CLIENT;
|
||||
}
|
||||
// Same connection config as the global client → reuse it
|
||||
if (global.MARIADB_CLIENT &&
|
||||
(!global.CONFIG ||
|
||||
mariadbClientCacheKey(config) ===
|
||||
mariadbClientCacheKey(global.CONFIG))) {
|
||||
return global.MARIADB_CLIENT;
|
||||
}
|
||||
// Returns the global client when it was created from the same config
|
||||
return grabMariaDBClient({ config });
|
||||
}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user