mirror of
https://github.com/nasa/openmct.git
synced 2025-06-03 16:10:54 +00:00
add a few more awaits
This commit is contained in:
parent
7c01a5e0d7
commit
bf9d5ef4a7
@ -131,6 +131,10 @@ export default class CompsManager extends EventEmitter {
|
|||||||
await this.#loadComposition();
|
await this.#loadComposition();
|
||||||
// Check if a newer load has been initiated
|
// Check if a newer load has been initiated
|
||||||
if (loadVersion !== this.#loadVersion) {
|
if (loadVersion !== this.#loadVersion) {
|
||||||
|
console.debug(
|
||||||
|
`🔄 Reloading comps manager in composition wait ${this.#domainObject.name} due to newer load.`
|
||||||
|
);
|
||||||
|
await this.#currentLoadPromise;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.#compositionLoaded = true;
|
this.#compositionLoaded = true;
|
||||||
@ -141,13 +145,17 @@ export default class CompsManager extends EventEmitter {
|
|||||||
await this.#startListeningToUnderlyingTelemetry();
|
await this.#startListeningToUnderlyingTelemetry();
|
||||||
// Check again for newer load
|
// Check again for newer load
|
||||||
if (loadVersion !== this.#loadVersion) {
|
if (loadVersion !== this.#loadVersion) {
|
||||||
|
console.debug(
|
||||||
|
`🔄 Reloading comps manager in telemetry wait ${this.#domainObject.name} due to newer load.`
|
||||||
|
);
|
||||||
|
await this.#currentLoadPromise;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.#loaded = true;
|
|
||||||
console.debug(
|
console.debug(
|
||||||
`✅ Comps manager ${this.#domainObject.name} is ready.`,
|
`✅ Comps manager ${this.#domainObject.name} is ready.`,
|
||||||
this.#telemetryCollections
|
this.#telemetryCollections
|
||||||
);
|
);
|
||||||
|
this.#loaded = true;
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ onconnect = function (e) {
|
|||||||
} catch (errorInCalculation) {
|
} catch (errorInCalculation) {
|
||||||
error = errorInCalculation;
|
error = errorInCalculation;
|
||||||
}
|
}
|
||||||
|
console.debug(`📭 Sending response for callback ID ${callbackID}`, result);
|
||||||
port.postMessage({ type: responseType, callbackID, result, error });
|
port.postMessage({ type: responseType, callbackID, result, error });
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user