mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 12:12:09 +01:00
refactor: comprehensive code quality improvements and dev environment fixes
- Convert ProcessingStatusManager from static class to individual functions - Refactor processSingleImport function to reduce cognitive complexity - Fix unused parameters in database-pool.ts event handlers - Add missing DATABASE_URL configuration to env.ts - Add pg package and @types/pg dependencies for PostgreSQL support - Fix tsx command execution by updating package.json scripts to use pnpm exec - Apply biome formatting fixes for import organization
This commit is contained in:
@ -33,19 +33,19 @@ const createConnectionPool = () => {
|
||||
});
|
||||
|
||||
// Connection pool event handlers
|
||||
pool.on("connect", (_client) => {
|
||||
pool.on("connect", () => {
|
||||
console.log(
|
||||
`Database connection established. Active connections: ${pool.totalCount}`
|
||||
);
|
||||
});
|
||||
|
||||
pool.on("acquire", (_client) => {
|
||||
pool.on("acquire", () => {
|
||||
console.log(
|
||||
`Connection acquired from pool. Waiting: ${pool.waitingCount}, Idle: ${pool.idleCount}`
|
||||
);
|
||||
});
|
||||
|
||||
pool.on("release", (_client) => {
|
||||
pool.on("release", () => {
|
||||
console.log(
|
||||
`Connection released to pool. Active: ${pool.totalCount - pool.idleCount}, Idle: ${pool.idleCount}`
|
||||
);
|
||||
@ -55,7 +55,7 @@ const createConnectionPool = () => {
|
||||
console.error("Database pool error:", err);
|
||||
});
|
||||
|
||||
pool.on("remove", (_client) => {
|
||||
pool.on("remove", () => {
|
||||
console.log(
|
||||
`Connection removed from pool. Total connections: ${pool.totalCount}`
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user