Skip to content

Commit 86d56f0

Browse files
committed
modify: db config linting
1 parent caf66d6 commit 86d56f0

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/configs/db.config.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ const poolConfig: pg.PoolConfig = {
1717
max: 10, // 최대 연결 수
1818
idleTimeoutMillis: 30000, // 연결 유휴 시간 (30초)
1919
connectionTimeoutMillis: 10000, // 연결 시간 초과 (10초)
20-
2120
};
2221

2322
if (process.env.NODE_ENV === 'production') {
@@ -48,11 +47,9 @@ async function initializeDatabase(): Promise<void> {
4847
logger.info('TimescaleDB 확장 성공');
4948

5049
return; // 성공
51-
5250
} finally {
5351
client.release();
5452
}
55-
5653
} catch (error) {
5754
logger.error(`데이터베이스 연결 실패 (시도 ${attempt}/${maxRetries}):`, error);
5855

@@ -62,15 +59,15 @@ async function initializeDatabase(): Promise<void> {
6259
}
6360

6461
logger.info(`${delay}ms 후 재시도...`);
65-
await new Promise(resolve => setTimeout(resolve, delay));
62+
await new Promise((resolve) => setTimeout(resolve, delay));
6663
delay = Math.floor(delay * 1.5);
6764
}
6865
}
6966
}
7067

71-
initializeDatabase().catch(error => {
68+
initializeDatabase().catch((error) => {
7269
logger.error('데이터베이스 초기화 중 예상치 못한 오류:', error);
7370
process.exit(1); // 치명적 오류시 서버 종료
7471
});
7572

76-
export default pool;
73+
export default pool;

0 commit comments

Comments
 (0)