Only set the dump timestamp for the current day.

Past days are either ACHIEVED or UNACHIEVED depending on whether the
time limit has been reached. The current day is in state COMPUTING.
This commit is contained in:
Ludovico Gardenghi
2024-10-08 11:26:29 +02:00
parent e3937ae843
commit dfc8ad3e83

View File

@@ -109,7 +109,7 @@ async function dumpDailySummariesForDevice(moon: MoonApi, directory: string, dev
for (const summary of summaries.items) {
const filename = 'pctl-daily-' + summary.deviceId + '-' + summary.date +
(summary.result === DailySummaryResult.ACHIEVED ? '' : '-' + timestamp) + '.json';
(summary.result === DailySummaryResult.COMPUTING ? '-' + timestamp : '') + '.json';
const file = path.join(directory, filename);
try {