corebasic 1.0.75 → 1.0.77
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 -1
- package/libs/messaging.js +3 -2
- package/package.json +1 -1
package/libs/features.js
CHANGED
|
@@ -47,7 +47,9 @@ export const start = async (app, url, file) => {
|
|
|
47
47
|
} else
|
|
48
48
|
await commandAction(req, res, topic)
|
|
49
49
|
} catch (err) {
|
|
50
|
-
|
|
50
|
+
try { // Sometimes error occurs when disconnecting stream from front end
|
|
51
|
+
res.status(err.status ?? 500).json(err)
|
|
52
|
+
} catch () { }
|
|
51
53
|
}
|
|
52
54
|
})
|
|
53
55
|
}
|
package/libs/messaging.js
CHANGED
|
@@ -37,9 +37,10 @@ async function connect({user,req,res, uid}) {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
export async function start(app) {
|
|
40
|
-
|
|
40
|
+
const url = process.env.REDIS_URL || "redis://localhost:6380"
|
|
41
|
+
consumer = createClient({ url });
|
|
41
42
|
await consumer.connect();
|
|
42
|
-
publisher = createClient({ url
|
|
43
|
+
publisher = createClient({ url });
|
|
43
44
|
await publisher.connect();
|
|
44
45
|
|
|
45
46
|
consumer.on('error', err => console.log('Redis Client Error', err));
|