Skip to content

Commit

Permalink
Merge branch 'dev' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
massimocandela committed Feb 2, 2022
2 parents 85d2a58 + 7d8773a commit 3d2e08a
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions src/connectors/connectorRIS.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ export default class ConnectorRIS extends Connector {
instance: this.instanceId
}
});

if (this._shouldCanaryMonitoringStart()) { // The canary feature may impact performance if you are planning to get all the possible updates of RIS
this._startCanaryInterval = setInterval(this._startCanary, 60000);
}
};

_shouldCanaryMonitoringStart = () => {
Expand Down Expand Up @@ -283,7 +279,10 @@ export default class ConnectorRIS extends Connector {
}))
.then(() => {
this._checkCanary();
clearInterval(this._startCanaryInterval);
this.logger.log({
level: 'info',
message: "Subscribed to beacons"
});
})
.catch(() => {
this.logger.log({
Expand All @@ -298,7 +297,7 @@ export default class ConnectorRIS extends Connector {
clearTimeout(this._timerCheckCanary);
if (!this.connected) {
this.logger.log({
level: 'error',
level: 'info',
message: "RIS connected again, the streaming session is working properly"
});
}
Expand Down Expand Up @@ -355,6 +354,16 @@ export default class ConnectorRIS extends Connector {
return (this.params.carefulSubscription
? Promise.all([this._subscribeToPrefixes(input), this._subscribeToASns(input)])
: this._subscribeToAll(input))
.then(() => {
this.logger.log({
level: 'info',
message: "Subscribed to monitored resources"
});
if (this._shouldCanaryMonitoringStart()) {
this._startCanary();
}
}
)
.then(() => {
this.onInputChange(input);

Expand Down

0 comments on commit 3d2e08a

Please sign in to comment.