Update index.ts

This commit is contained in:
2022-02-16 21:17:41 -05:00
parent 077adf5a13
commit e246186174
+1 -1
View File
@@ -57,7 +57,7 @@ async function main() {
return row.value !== null && row.value !== undefined;
})
const latest_read = filtered_data[0];
update_sensor(latest_read);
// update_sensor(latest_read);
for (const row of filtered_data) {
await energyModel.updateOrCreate({ startTime: new Date(row.startTime), endTime: new Date(row.endTime) }, { energy: row.value }).catch((e) => {
console.log(chalk.red(`Err: ${e}`));