Fixed quit function blocked by lack of db upd8
This commit is contained in:
parent
2358d6eb8f
commit
ac1848c48e
@ -275,6 +275,11 @@ const functions = {
|
||||
if (err) console.log('Error removing the quit file: ' + err);
|
||||
config.status.shutdownNextCycle = 1;
|
||||
config.status.auger = 0;
|
||||
const shutdownNextCycleQuery = "UPDATE status SET value = 1 WHERE key = 'shutdown_next_cycle'";
|
||||
dbfn.run(shutdownNextCycleQuery).then(res => {
|
||||
if (process.env.DEBUG) console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] I: ${res.status}`);
|
||||
console.log(`[${(Date.now() - config.timestamps.procStart) / 1000}] I: Shutting down next cycle.`);
|
||||
}).catch(err => console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] E: ${err}`));
|
||||
resolve();
|
||||
});
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user