Update index.ts
This commit is contained in:
@@ -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}`));
|
||||
|
||||
Reference in New Issue
Block a user