Created
June 5, 2017 12:03
-
-
Save seven-cd/d9584b22d0018be278eab83305c0f249 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getContainers(params, meta) { | |
let query = resourceQueries.loadQuery('selectContainers'); | |
let connection; | |
return dbConnect.getConnectionAsync().then((dbConnection) => { | |
connection = dbConnection; | |
return connection.queryAsync(query, params).then((result) => { | |
return resourceParser.parseContainersFromDb(result); | |
}); | |
}).catch((exception) => { | |
cmsLogger.error(exception); | |
throw new Exception(exception.code); | |
}).finally(() => { | |
if (connection) connection.release(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment