mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
refactor: Upgrade typeorm to 0.3.x (#5151)
This commit is contained in:
committed by
GitHub
parent
6608e69457
commit
0a5ab560b1
@@ -6,7 +6,6 @@ import bodyParser from 'body-parser';
|
||||
import bodyParserXml from 'body-parser-xml';
|
||||
import compression from 'compression';
|
||||
import parseUrl from 'parseurl';
|
||||
import { getConnectionManager } from 'typeorm';
|
||||
import type { RedisOptions } from 'ioredis';
|
||||
|
||||
import {
|
||||
@@ -162,10 +161,10 @@ export abstract class AbstractServer {
|
||||
this.app.get('/healthz', async (req, res) => {
|
||||
Logger.debug('Health check started!');
|
||||
|
||||
const connection = getConnectionManager().get();
|
||||
const connection = Db.getConnection();
|
||||
|
||||
try {
|
||||
if (!connection.isConnected) {
|
||||
if (!connection.isInitialized) {
|
||||
// Connection is not active
|
||||
throw new ServiceUnavailableError('No active database connection!');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user