Added additional reactor handling
This commit is contained in:
@@ -233,7 +233,18 @@ class ChildRegistrationUtils {
|
|||||||
this.logger.warn("Invalid reactor provided.");
|
this.logger.warn("Invalid reactor provided.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.mainClass.upstreamReactor = reactor; // Add reactor to the main class
|
|
||||||
|
// this is poor code, it should be fixed at some point
|
||||||
|
if (this.mainClass?.upstreamReactor){
|
||||||
|
this.mainClass.upstreamReactor = reactor; // Add reactor to the main class
|
||||||
|
} else {
|
||||||
|
if (positionVsParent == "downstream") {
|
||||||
|
this.mainClass.reactors[0] = reactor;
|
||||||
|
}
|
||||||
|
if (positionVsParent == "upstream") {
|
||||||
|
this.mainClass.reactors[1] = reactor;
|
||||||
|
}
|
||||||
|
}
|
||||||
this.logger.info(`Reactor registered successfully.`);
|
this.logger.info(`Reactor registered successfully.`);
|
||||||
|
|
||||||
reactor.emitter.on("stateChange", (data) => {
|
reactor.emitter.on("stateChange", (data) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user