Skip to content

Commit 3546763

Browse files
committed
dynamic cluster name and remove debug in retrieve and rank
1 parent 3f1634f commit 3546763

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

  • services/retrieve_and_rank

services/retrieve_and_rank/v1.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,12 @@ module.exports = function (RED) {
155155
this.on('input', function(msg) {
156156
setupRankRetrieveNode(msg, config, this, function (retrieve_and_rank) {
157157

158+
//Cluster name can be passed into msg.payload, but the cluster name
159+
//specified in the config takes priority
160+
var clustername;
161+
(config.clustername != "") ? clustername = config.clustername : clustername = msg.payload;
158162
var params = {
159-
cluster_name: config.clustername,
163+
cluster_name: clustername,
160164
cluster_size: config.clustersize !== 'free' ? config.clustersize : null,
161165
}
162166

@@ -480,7 +484,6 @@ module.exports = function (RED) {
480484

481485
//Check credentials
482486
this.credentials = RED.nodes.getNode(config.servicecreds);
483-
console.log(config);
484487
username = username || this.credentials.username;
485488
password = password || this.credentials.password;
486489

0 commit comments

Comments
 (0)