Update various configuration files, components, and assets; enhance notification system and API endpoints; improve documentation and styles across the application.
This commit is contained in:
24
scripts/cleanup-connections.js
Normal file
24
scripts/cleanup-connections.js
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* Cleanup script to disconnect all Prisma connections
|
||||
* Run this before restarting the server if you have connection pool issues
|
||||
*/
|
||||
|
||||
const { PrismaClient } = require('@prisma/client');
|
||||
|
||||
async function cleanup() {
|
||||
const prisma = new PrismaClient();
|
||||
|
||||
try {
|
||||
console.log('🔌 Disconnecting Prisma client...');
|
||||
await prisma.$disconnect();
|
||||
console.log('✅ Prisma client disconnected successfully');
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('❌ Error disconnecting Prisma:', error);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
cleanup();
|
||||
Reference in New Issue
Block a user