MP starts again...
This commit is contained in:
+5
-5
@@ -27,7 +27,7 @@ export const methods = {
|
||||
|
||||
let coudSubscribe = false
|
||||
for(const rediscnx of this.allRediscnx){
|
||||
if(!chan.startsWith(rediscnx.redisConfig.ChansFilter)) continue
|
||||
if(!chan.startsWith(rediscnx.redisConfig.chansNamespace)) continue
|
||||
else coudSubscribe = true
|
||||
let localChan = rediscnx.redisConfig.basePrefix + localChan
|
||||
if(!(localChan in rediscnx.subscriptions)) rediscnx.subscriptions[localChan] = [];
|
||||
@@ -76,7 +76,7 @@ export const methods = {
|
||||
|
||||
let couldUnsubscribe = false
|
||||
for(const rediscnx of this.allRediscnx){
|
||||
if(!chan.startsWith(rediscnx.redisConfig.ChansFilter)) continue
|
||||
if(!chan.startsWith(rediscnx.redisConfig.chansNamespace)) continue
|
||||
else couldUnsubscribe = true
|
||||
let localChan = rediscnx.redisConfig.basePrefix + chan
|
||||
if((localChan in rediscnx.subscriptions) && (rediscnx.subscriptions[chan].includes(this.uuid))) {
|
||||
@@ -159,7 +159,7 @@ export const methods = {
|
||||
const chan = payload.chan
|
||||
|
||||
// First find the primary redis for this chan namespace, to do historization first, and get the histId
|
||||
const primaryRediscnx = this.allRediscnx.find(cnx => ((chan.startsWith(cnx.redisConfig.ChansFilter)) &&(cnx.redisConfig.role=='primary')) )
|
||||
const primaryRediscnx = this.allRediscnx.find(cnx => ((chan.startsWith(cnx.redisConfig.chansNamespace)) &&(cnx.redisConfig.role=='primary')) )
|
||||
if(!primaryRediscnx){
|
||||
this.sendErr(action, 'No primary redis for this chan !', reqid);
|
||||
if(this.debug) console.log('PUB: No primary redis for this chan ', chan)
|
||||
@@ -178,7 +178,7 @@ export const methods = {
|
||||
// Now publish on every Redis that covers this chan namespace
|
||||
try { payload.msg = JSON.stringify(msgO) } catch(err) {payload.msg = `{"err":"${err}}"` }
|
||||
for(const rediscnx of this.allRediscnx){
|
||||
if(!chan.startsWith(rediscnx.redisConfig.ChansFilter)) continue
|
||||
if(!chan.startsWith(rediscnx.redisConfig.chansNamespace)) continue
|
||||
rediscnx.redisPublish(chan, payload.msg)
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ export const methods = {
|
||||
return
|
||||
}
|
||||
|
||||
const primaryRediscnx = this.allRediscnx.find(cnx => ((chan.startsWith(cnx.redisConfig.ChansFilter)) &&(cnx.redisConfig.role=='primary')) )
|
||||
const primaryRediscnx = this.allRediscnx.find(cnx => ((chan.startsWith(cnx.redisConfig.chansNamespace)) &&(cnx.redisConfig.role=='primary')) )
|
||||
if(!primaryRediscnx){
|
||||
this.sendErr(action, 'No primary redis for this chan !', reqid);
|
||||
if(this.debug) console.log('CHANHIST: No primary redis for this chan ', chan)
|
||||
|
||||
Reference in New Issue
Block a user