corebasic 1.0.92 → 1.0.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/libs/features.js +3 -3
- package/package.json +1 -1
package/libs/features.js
CHANGED
|
@@ -41,16 +41,16 @@ async function announce() {
|
|
|
41
41
|
for (let [key, {api}] of Object.entries(features))
|
|
42
42
|
exp_features[key] = {api, service: SERVICE_ADDRESS}
|
|
43
43
|
|
|
44
|
-
await Messaging.subscribe(
|
|
44
|
+
await Messaging.subscribe(`${process.env.REDIS_CHANNEL_PREFIX}_SLYP_FEATURES_LIST`, async (message, channel) => {
|
|
45
45
|
let msg = JSON.parse(message)
|
|
46
46
|
if (msg.uid !== appId && !appids[msg.uid]) {
|
|
47
47
|
appids[msg.uid] = true
|
|
48
48
|
SLYP_FEATURES_LIST = {...SLYP_FEATURES_LIST, ...msg}
|
|
49
49
|
delete SLYP_FEATURES_LIST.uid
|
|
50
|
-
await Messaging.produce(
|
|
50
|
+
await Messaging.produce(`${process.env.REDIS_CHANNEL_PREFIX}_SLYP_FEATURES_LIST`, JSON.stringify({...exp_features, uid: appId }))
|
|
51
51
|
}
|
|
52
52
|
})
|
|
53
|
-
await Messaging.produce(
|
|
53
|
+
await Messaging.produce(`${process.env.REDIS_CHANNEL_PREFIX}_SLYP_FEATURES_LIST`, JSON.stringify({...exp_features, uid: appId }))
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
export const start = async (app, url, file) => {
|