Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/telemetry-comps' into combined-r…
Browse files Browse the repository at this point in the history
…odap-stuff
  • Loading branch information
scottbell committed Oct 28, 2024
2 parents dc13592 + 55063a0 commit f19d7a8
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 25 deletions.
1 change: 1 addition & 0 deletions e2e/tests/functional/plugins/comps/comps.e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
import { expect, test } from '../../../../pluginFixtures.js';

test.describe('Comps', () => {
test.use({ failOnConsoleError: false });
test.beforeEach(async ({ page }) => {
// Open a browser, navigate to the main page, and wait until all networkevents to resolve
await page.goto('./', { waitUntil: 'domcontentloaded' });
Expand Down
16 changes: 0 additions & 16 deletions src/plugins/comps/CompsManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,6 @@ export default class CompsManager extends EventEmitter {
const loadVersion = ++this.#loadVersion;

if (!_.isEqual(this.#telemetryOptions, telemetryOptions)) {
console.debug(
`😩 Reloading comps manager ${this.#domainObject.name} due to telemetry options change.`,
telemetryOptions
);
this.#destroy();
}

Expand All @@ -131,9 +127,6 @@ export default class CompsManager extends EventEmitter {
await this.#loadComposition();
// Check if a newer load has been initiated
if (loadVersion !== this.#loadVersion) {
console.debug(
`🔄 Reloading comps manager in composition wait ${this.#domainObject.name} due to newer load.`
);
await this.#currentLoadPromise;
return;
}
Expand All @@ -145,16 +138,9 @@ export default class CompsManager extends EventEmitter {
await this.#startListeningToUnderlyingTelemetry();
// Check again for newer load
if (loadVersion !== this.#loadVersion) {
console.debug(
`🔄 Reloading comps manager in telemetry wait ${this.#domainObject.name} due to newer load.`
);
await this.#currentLoadPromise;
return;
}
console.debug(
`✅ Comps manager ${this.#domainObject.name} is ready.`,
this.#telemetryCollections
);
this.#loaded = true;
}
})();
Expand Down Expand Up @@ -259,8 +245,6 @@ export default class CompsManager extends EventEmitter {
const imputedDatum = this.#getImputedDataUsingLOCF(fakeData, telemetryCollection);
if (imputedDatum) {
alignedValues.push(imputedDatum);
} else {
console.debug(`🚨 Missing data for ${keyString} at ${timestamp}`);
}
});

Expand Down
9 changes: 0 additions & 9 deletions src/plugins/comps/CompsTelemetryProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ export default class CompsTelemetryProvider {
parameters,
callbackID
};
console.debug(
`📝 Requesting calculation for ${domainObject.name} with callback ID ${callbackID}:`,
options,
payload
);
this.#sharedWorker.port.postMessage(payload);
});
});
Expand Down Expand Up @@ -130,9 +125,6 @@ export default class CompsTelemetryProvider {
size: 1
};
specificCompsManager.load(telemetryOptions);
console.debug(
`📝 Starting subscription for ${domainObject.name} with callback ID ${callbackID}`
);
return () => {
delete this.#subscriptionCallbacks[callbackID];
specificCompsManager.stopListeningToUnderlyingTelemetry();
Expand Down Expand Up @@ -171,7 +163,6 @@ export default class CompsTelemetryProvider {
console.error('📝 Error calculating request:', event.data);
this.#requestPromises[callbackID].resolve([]);
} else {
console.debug(`🧮 Calculation request result for ${callbackID}:`, result);
this.#requestPromises[callbackID].resolve(result);
}
delete this.#requestPromises[callbackID];
Expand Down

0 comments on commit f19d7a8

Please sign in to comment.