Revert "Test shutdown"

This reverts commit 85182e7dd1.
This commit is contained in:
mei23 2021-06-04 14:47:49 +09:00
parent 85182e7dd1
commit 04d2415eb8
No known key found for this signature in database
GPG Key ID: DD8628500D3E4B23
1 changed files with 7 additions and 9 deletions

View File

@ -40,13 +40,11 @@ const charts = [
perUserDriveChart, perUserDriveChart,
]; ];
if (process.env.NODE_ENV !== 'test') { // 20分おきにメモリ情報をDBに書き込み
// 20分おきにメモリ情報をDBに書き込み setInterval(() => {
setInterval(() => {
for (const chart of charts) { for (const chart of charts) {
chart.save(); chart.save();
} }
}, 1000 * 60 * 20); }, 1000 * 60 * 20);
beforeShutdown(() => Promise.all(charts.map(chart => chart.save()))); beforeShutdown(() => Promise.all(charts.map(chart => chart.save())));
}