parent
85182e7dd1
commit
04d2415eb8
|
@ -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())));
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue