more relation events, events are now not triggered on sync changes

This commit is contained in:
azivner
2018-08-15 22:06:49 +02:00
parent df9acd0504
commit 0f106fb96f
8 changed files with 117 additions and 55 deletions

View File

@@ -3,7 +3,6 @@ const sourceIdService = require('./source_id');
const dateUtils = require('./date_utils');
const log = require('./log');
const cls = require('./cls');
const eventService = require('./events');
async function addNoteSync(noteId, sourceId) {
await addEntitySync("notes", noteId, sourceId)
@@ -52,11 +51,6 @@ async function addEntitySync(entityName, entityId, sourceId) {
syncDate: dateUtils.nowDate(),
sourceId: sourceId || cls.getSourceId() || sourceIdService.getCurrentSourceId()
});
await eventService.emit(eventService.ENTITY_CHANGED, {
entityName,
entityId
});
}
async function cleanupSyncRowsForMissingEntities(entityName, entityKey) {
@@ -116,6 +110,5 @@ module.exports = {
addAttributeSync,
addApiTokenSync,
addEntitySync,
cleanupSyncRowsForMissingEntities,
fillAllSyncRows
};