fix: close durable queue and runtime gaps
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { registerDb, setDb } from "@wrnexus/db";
|
||||
import { connectFromConfig } from "@wrnexus/db/connect";
|
||||
import { loadAppConfig, loadEnv } from "@wrnexus/styles";
|
||||
|
||||
const root = process.env.WRNEXUS_TEST_ROOT;
|
||||
if (root) {
|
||||
const profile = process.env.WRNEXUS_PROFILE || "test";
|
||||
loadEnv(root, profile);
|
||||
const config = await loadAppConfig(root, profile);
|
||||
if (config.db) setDb(connectFromConfig(config.db, root));
|
||||
for (const [name, database] of Object.entries(config.databases ?? {})) {
|
||||
registerDb(name, connectFromConfig(database, root));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user