Merge pull request #2369 from overleaf/em-imports-tpds

Defer flushing to TPDS on project import from v1

GitOrigin-RevId: f2782326716999c37565b3e527b54444bbc53711
This commit is contained in:
Eric Mc Sween
2019-11-26 13:30:46 +00:00
committed by sharelatex
parent e51893ffb1
commit 3da8413156
14 changed files with 442 additions and 306 deletions
@@ -27,6 +27,7 @@ const TokenAccessHandler = require('../TokenAccess/TokenAccessHandler')
const CollaboratorsGetter = require('../Collaborators/CollaboratorsGetter')
const Modules = require('../../infrastructure/Modules')
const ProjectEntityHandler = require('./ProjectEntityHandler')
const TpdsProjectFlusher = require('../ThirdPartyDataStore/TpdsProjectFlusher')
const UserGetter = require('../User/UserGetter')
const NotificationsBuilder = require('../Notifications/NotificationsBuilder')
const { V1ConnectionError } = require('../Errors/Errors')
@@ -720,7 +721,10 @@ const ProjectController = {
(error, brandVariationDetails) => cb(error, brandVariationDetails)
)
}
]
],
flushToTpds: cb => {
TpdsProjectFlusher.flushProjectToTpdsIfNeeded(projectId, cb)
}
},
(err, results) => {
if (err != null) {