schedule database cleanup
This commit is contained in:
parent
f57444a3d1
commit
ca37e38800
@ -38,6 +38,9 @@ async function init (use_fake_seed) {
|
||||
|
||||
// await db.seed.run ({ specific: 'fake.js' });
|
||||
await job (db);
|
||||
setInterval (() => {
|
||||
job (db);
|
||||
}, 3600e3);
|
||||
}
|
||||
|
||||
function get_db () {
|
||||
|
@ -40,6 +40,8 @@ async function batch_update (knex, ids, data) {
|
||||
}
|
||||
|
||||
module.exports = async (knex) => {
|
||||
console.log ('-- running database cleanup --');
|
||||
|
||||
const apps = await knex ('app')
|
||||
.select ('id', 'name', 'reduction');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user