You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/09/28 21:21:47 UTC
[GitHub] tysonnorris commented on a change in pull request #163: Added
support for Azure cosmosDB for alarms package
tysonnorris commented on a change in pull request #163: Added support for Azure cosmosDB for alarms package
URL: https://github.com/apache/incubator-openwhisk-package-alarms/pull/163#discussion_r221384511
##########
File path: action/alarmWebAction.js
##########
@@ -131,7 +131,8 @@ function main(params) {
return new Promise(function (resolve, reject) {
common.verifyTriggerAuth(triggerData, false)
.then(() => {
- db = new Database(params.DB_URL, params.DB_NAME);
+ db = getDatabase(params.DB_URL, params.DB_NAME, params.DB_TYPE,
+ params.COSMOSDB_ROOT_DB, params.COSMOSDB_MASTERKEY);
Review comment:
instead of "all possible params" being in the sig, I think it might be simpler to pass a config object, which will vary based on db type, e.g.
```
let cosmosConfig = {type: "cosmosdb", url: "", rootdb:"", masterkey:""};
let couchConfig = {type: "couchdb", url: "", dbname:""};
getDatabase(config);
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services