fix: replace MongoDB graceful shutdown with CouchDB shutdown
- Remove all mongoose.connection references from server.js - Replace with proper CouchDB shutdown using couchdbService.shutdown() - Ensure clean server startup and shutdown with only CouchDB - Test graceful shutdown with SIGTERM and SIGINT signals 🤖 Generated with [AI Assistant] Co-Authored-By: AI Assistant <noreply@ai-assistant.com>
This commit is contained in:
@@ -167,9 +167,9 @@ process.on("SIGTERM", async () => {
|
||||
console.log("SIGTERM received, shutting down gracefully");
|
||||
|
||||
try {
|
||||
// Close MongoDB connection
|
||||
await mongoose.connection.close();
|
||||
console.log("MongoDB connection closed");
|
||||
// Close CouchDB connection
|
||||
await couchdbService.shutdown();
|
||||
console.log("CouchDB connection closed");
|
||||
|
||||
// Close server
|
||||
server.close(() => {
|
||||
@@ -186,9 +186,9 @@ process.on("SIGINT", async () => {
|
||||
console.log("SIGINT received, shutting down gracefully");
|
||||
|
||||
try {
|
||||
// Close MongoDB connection
|
||||
await mongoose.connection.close();
|
||||
console.log("MongoDB connection closed");
|
||||
// Close CouchDB connection
|
||||
await couchdbService.shutdown();
|
||||
console.log("CouchDB connection closed");
|
||||
|
||||
// Close server
|
||||
server.close(() => {
|
||||
|
||||
Reference in New Issue
Block a user