Test shutdown
This commit is contained in:
parent
a5a2f9d01e
commit
85182e7dd1
|
@ -40,11 +40,13 @@ const charts = [
|
||||||
perUserDriveChart,
|
perUserDriveChart,
|
||||||
];
|
];
|
||||||
|
|
||||||
// 20分おきにメモリ情報をDBに書き込み
|
if (process.env.NODE_ENV !== 'test') {
|
||||||
setInterval(() => {
|
// 20分おきにメモリ情報をDBに書き込み
|
||||||
for (const chart of charts) {
|
setInterval(() => {
|
||||||
chart.save();
|
for (const chart of charts) {
|
||||||
}
|
chart.save();
|
||||||
}, 1000 * 60 * 20);
|
}
|
||||||
|
}, 1000 * 60 * 20);
|
||||||
|
|
||||||
beforeShutdown(() => Promise.all(charts.map(chart => chart.save())));
|
beforeShutdown(() => Promise.all(charts.map(chart => chart.save())));
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue