From 5c02255e07ff740f1df2e6aeeeb19deddf292644 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Thu, 3 Aug 2017 11:44:10 +0100 Subject: [PATCH] use syncType and syncState for clsi state options --- .../app/coffee/Features/Compile/ClsiManager.coffee | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/services/web/app/coffee/Features/Compile/ClsiManager.coffee b/services/web/app/coffee/Features/Compile/ClsiManager.coffee index 6d8baefe5e..32f3ce9f67 100755 --- a/services/web/app/coffee/Features/Compile/ClsiManager.coffee +++ b/services/web/app/coffee/Features/Compile/ClsiManager.coffee @@ -20,7 +20,7 @@ module.exports = ClsiManager = ClsiManager.sendRequestOnce project_id, user_id, _.clone(options), (error, status, result...) -> return callback(error) if error? if status is 'conflict' - options.state = "conflict" # will force full compile + options.syncType = "full" # force full compile ClsiManager.sendRequestOnce project_id, user_id, options, callback # try again else callback(error, status, result...) @@ -126,7 +126,7 @@ module.exports = ClsiManager = ClsiStateManager.checkProjectStateMatch project_id, project, (error, stateOk, projectState) -> return callback(error) if error? logger.log project_id: project_id, checkState: stateOk, "checked project state" - if stateOk and not options.state? # incremental + if stateOk and options.syncType isnt "full" # incremental ClsiManager._getContentFromDocUpdater project_id, (error, docUpdaterDocs) -> return callback(error) if error? # make this incremental @@ -136,7 +136,8 @@ module.exports = ClsiManager = for doc in docUpdaterDocs or [] path = docPath[doc._id] docs[path] = doc - options.incremental = projectState + options.syncType = "incremental" + options.syncState = projectState ClsiManager._finaliseRequest project_id, options, project, docs, [], callback else ClsiManager._getContentFromMongo project_id, (error, docs, files) -> @@ -147,7 +148,8 @@ module.exports = ClsiManager = if error? logger.err err:error, project_id:project_id, "error storing state in redis" #return callback(error) - options.state = projectState + options.syncType = "full" + options.syncState = projectState ClsiManager._finaliseRequest project_id, options, project, docs, files, callback _getContentFromDocUpdater: (project_id, callback = (error, docs) ->) -> @@ -200,8 +202,8 @@ module.exports = ClsiManager = imageName: project.imageName draft: !!options.draft check: options.check - incremental: options.incremental - state: options.state + syncType: options.syncType + syncState: options.syncState rootResourcePath: rootResourcePath resources: resources }