We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73b4485 commit 3f2865aCopy full SHA for 3f2865a
backend/matching/src/index.ts
@@ -15,12 +15,15 @@ server.listen(port, () => {
15
['Cleaner', 'Matcher'].map(initWorker).forEach((process) => workers.push(process));
16
});
17
18
-const shutdown = async () => {
19
- await Promise.all(workers.map((worker) => worker.kill()));
+const shutdown = () => {
+ workers.forEach((worker) => {
20
+ worker.kill();
21
+ });
22
server.close(() => {
23
logger.info('App shut down');
24
25
};
26
27
process.on('SIGINT', shutdown);
28
process.on('SIGTERM', shutdown);
29
+process.on('exit', shutdown);
0 commit comments