1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-11 18:24:43 +02:00
joplin/packages/lib/services/ItemChangeUtils.js

14 lines
528 B
JavaScript
Raw Normal View History

2020-11-05 18:58:23 +02:00
const Setting = require('../models/Setting').default;
const ItemChange = require('../models/ItemChange');
class ItemChangeUtils {
static async deleteProcessedChanges() {
2019-07-29 15:43:53 +02:00
const lastProcessedChangeIds = [Setting.value('resourceService.lastProcessedChangeId'), Setting.value('searchEngine.lastProcessedChangeId'), Setting.value('revisionService.lastProcessedChangeId')];
const lowestChangeId = Math.min(...lastProcessedChangeIds);
await ItemChange.deleteOldChanges(lowestChangeId);
}
}
2019-07-29 15:43:53 +02:00
module.exports = ItemChangeUtils;