modified to use events, hopefully will fix the crashing particle
This commit is contained in:
parent
40f260c244
commit
1beedc8bf5
@ -59,16 +59,12 @@ function closeDB() {
|
||||
}
|
||||
|
||||
function insertTempReading(time, reading) {
|
||||
logger.log('Inserting reading:' + reading);
|
||||
logger.debug('Inserting reading:' + reading);
|
||||
|
||||
// var sql = db.prepare('INSERT into temperature(date, reading) VALUES
|
||||
// (?,?)',[time],[reading]);
|
||||
temp_db.run('BEGIN TRANSACTION');
|
||||
|
||||
temp_db.run('INSERT into temp(date, reading) VALUES (?,?);', [time, reading]);
|
||||
|
||||
// temp_db.run('END');
|
||||
|
||||
temp_db.run('commit');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user