server/14-apr-26 #69

Merged
bagasbanuna merged 17 commits from server/14-apr-26 into staging 2026-04-14 16:38:23 +08:00
33 changed files with 351 additions and 1896 deletions
Showing only changes of commit cd3a9cc223 - Show all commits

View File

@@ -46,10 +46,15 @@ async function gracefulShutdown(): Promise<void> {
} }
// Register shutdown handlers (hanya di environment Node.js) // Register shutdown handlers (hanya di environment Node.js)
// Cegah duplikasi listener dengan cek listenerCount terlebih dahulu
if (typeof process !== "undefined") { if (typeof process !== "undefined") {
if (process.listenerCount("SIGINT") === 0) {
process.on("SIGINT", gracefulShutdown); process.on("SIGINT", gracefulShutdown);
}
if (process.listenerCount("SIGTERM") === 0) {
process.on("SIGTERM", gracefulShutdown); process.on("SIGTERM", gracefulShutdown);
} }
}
export default prisma; export default prisma;
export { prisma }; export { prisma };