mirror of
https://github.com/zadam/trilium.git
synced 2024-11-17 13:14:44 +08:00
20 lines
No EOL
480 B
JavaScript
20 lines
No EOL
480 B
JavaScript
"use strict";
|
|
|
|
const sql = require('../../services/sql');
|
|
const log = require('../../services/log');
|
|
const consistencyChecksService = require('../../services/consistency_checks');
|
|
|
|
async function vacuumDatabase() {
|
|
await sql.execute("VACUUM");
|
|
|
|
log.info("Database has been vacuumed.");
|
|
}
|
|
|
|
async function findAndFixConsistencyIssues() {
|
|
await consistencyChecksService.runOnDemandChecks(true);
|
|
}
|
|
|
|
module.exports = {
|
|
vacuumDatabase,
|
|
findAndFixConsistencyIssues
|
|
}; |