log out error when can't send to tpds worker

This commit is contained in:
Henry Oswald 2016-03-14 14:44:45 +00:00
parent 1b39b01114
commit f24bc2c501

View file

@ -168,8 +168,10 @@ module.exports = ProjectEntityHandler =
if err? if err?
logger.err err:err, project_id: project._id, folder_id: folder_id, file_name: fileName, fileRef:fileRef, "error adding file with project" logger.err err:err, project_id: project._id, folder_id: folder_id, file_name: fileName, fileRef:fileRef, "error adding file with project"
return callback(err) return callback(err)
tpdsUpdateSender.addFile {project_id:project._id, file_id:fileRef._id, path:result?.path?.fileSystem, project_name:project.name, rev:fileRef.rev}, -> tpdsUpdateSender.addFile {project_id:project._id, file_id:fileRef._id, path:result?.path?.fileSystem, project_name:project.name, rev:fileRef.rev}, (err)->
callback(err, fileRef, folder_id) if err?
logger.err err:err, project_id: project._id, folder_id: folder_id, file_name: fileName, fileRef:fileRef, "error sending file to tpdsworker"
callback(null, fileRef, folder_id)
replaceFile: (project_id, file_id, fsPath, callback)-> replaceFile: (project_id, file_id, fsPath, callback)->
ProjectGetter.getProject project_id, {name:true}, (err, project) -> ProjectGetter.getProject project_id, {name:true}, (err, project) ->