make code clearer when compilation is per-user

This commit is contained in:
Brian Gough 2016-06-02 16:54:46 +01:00
parent 55a8e3cffe
commit 634c774592

View file

@ -37,8 +37,9 @@ module.exports = CompileManager =
return callback(error) if error? return callback(error) if error?
for key, value of limits for key, value of limits
options[key] = value options[key] = value
user_id = undefined if not options.isolated # only pass user_id down to clsi if this is a per-user compile
ClsiManager.sendRequest project_id, user_id, options, (error, status, outputFiles, clsiServerId) -> compileAsUser = if options.isolated then user_id else undefined
ClsiManager.sendRequest project_id, compileAsUser, options, (error, status, outputFiles, clsiServerId) ->
return callback(error) if error? return callback(error) if error?
logger.log files: outputFiles, "output files" logger.log files: outputFiles, "output files"
callback(null, status, outputFiles, clsiServerId, limits) callback(null, status, outputFiles, clsiServerId, limits)