Commit a653b5dd authored by tobinski's avatar tobinski
Browse files

Revert response collector, we use the kafka url resolver

parent ca02c0f5
......@@ -182,16 +182,11 @@ export class ApiController {
async function waitForResponse(data: InterfaceStreamAppResponse) {
// if we fail to resolve the url to a provider we will send a 500
try {
console.log("Try to add data");
await responseData.add(data);
console.log("data added");
} catch (error) {
return next(Boom.internal('Unable to resolve urls to provider'));
}
console.log("tmp data");
console.log(responseData.getData());
if (responseData.finished()) {
console.log("finished");
// set the cache each time we got new data and have at least a minimum set
KafkaCache.set(id, responseData.getData());
if(!answered) {
......
......@@ -46,6 +46,7 @@ export class ResponseCollector {
// find key and add data
if(this.config.indexOf(data.name) > -1){
if(Array.isArray(this.finalData.data[data.name])) {
// perhaps wrong
this.finalData.data[data.name].push(data.data);
} else {
this.finalData.data[data.name] = data.data;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment