removed event log

This commit is contained in:
zadam
2019-09-02 20:30:28 +02:00
parent a6f57d7761
commit 5d80df398b
10 changed files with 2 additions and 92 deletions

View File

@@ -4,7 +4,7 @@ const build = require('./build');
const packageJson = require('../../package');
const {TRILIUM_DATA_DIR} = require('./data_dir');
const APP_DB_VERSION = 142;
const APP_DB_VERSION = 143;
const SYNC_VERSION = 10;
const CLIPPER_PROTOCOL_VERSION = "1.0";

View File

@@ -3,7 +3,6 @@
const sql = require('./sql');
const utils = require('./utils');
const log = require('./log');
const eventLogService = require('./event_log');
const ws = require('./ws.js');
const ApiToken = require('../entities/api_token');
const Branch = require('../entities/branch');
@@ -56,8 +55,6 @@ async function checkContentHashes(otherHashes) {
if (hashes[key] !== otherHashes[key]) {
allChecksPassed = false;
await eventLogService.addEvent(`Content hash check for ${key} FAILED. Local is ${hashes[key]}, remote is ${otherHashes[key]}`);
if (key !== 'recent_notes') {
// let's not get alarmed about recent notes which get updated often and can cause failures in race conditions
await ws.sendMessageToAllClients({type: 'sync-hash-check-failed'});

View File

@@ -1,23 +0,0 @@
const sql = require('./sql');
const dateUtils = require('./date_utils');
const utils = require('./utils');
const log = require('./log');
async function addEvent(comment) {
await addNoteEvent(null, comment);
}
async function addNoteEvent(noteId, comment) {
await sql.insert('event_log', {
eventId: utils.newEntityId(),
noteId : noteId,
comment: comment,
utcDateCreated: dateUtils.utcNowDateTime()
});
log.info("Event log for " + noteId + ": " + comment);
}
module.exports = {
addEvent
};

View File

@@ -1,6 +1,5 @@
const sql = require('./sql');
const log = require('./log');
const eventLogService = require('./event_log');
const syncTableService = require('./sync_table');
const eventService = require('./events');
@@ -138,8 +137,6 @@ async function updateOptions(entity, sourceId) {
await sql.replace('options', entity);
await syncTableService.addOptionsSync(entity.name, sourceId);
await eventLogService.addEvent("Synced option " + entity.name);
}
});
}