fix startup crash when calling check_connect.js
This commit is contained in:
parent
e4c29e7aa0
commit
a1bff0e0fe
1 changed files with 2 additions and 1 deletions
|
|
@ -6,6 +6,7 @@
|
|||
import Redis from 'ioredis';
|
||||
import { loadConfig } from '../built/config.js';
|
||||
import { createPostgresDataSource } from '../built/postgres.js';
|
||||
import Logger from '../src/logger.js';
|
||||
|
||||
const config = loadConfig();
|
||||
|
||||
|
|
@ -13,7 +14,7 @@ const config = loadConfig();
|
|||
// usually, it only opens connections first use, so we force it using
|
||||
// .initialize()
|
||||
async function connectToPostgres() {
|
||||
const source = createPostgresDataSource(config);
|
||||
const source = createPostgresDataSource(config, new Logger('check-connect'));
|
||||
await source.initialize();
|
||||
await source.destroy();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue