@rpcbase/server 0.123.0 → 0.125.0
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/package.json
CHANGED
|
@@ -41,6 +41,9 @@ const get_dispatch_change_handler = (model_name) => (change) => {
|
|
|
41
41
|
|
|
42
42
|
const register_model_emitter = (model_name) => {
|
|
43
43
|
console.log("REGGGGGG", model_name)
|
|
44
|
+
const estack = new Error()
|
|
45
|
+
console.log("stack", estack.stack)
|
|
46
|
+
|
|
44
47
|
|
|
45
48
|
const model = mongoose.model(model_name)
|
|
46
49
|
|
|
@@ -55,7 +58,7 @@ const register_model_emitter = (model_name) => {
|
|
|
55
58
|
log("server::queue::register_queue_listener:: change listener emitter got error", err)
|
|
56
59
|
})
|
|
57
60
|
|
|
58
|
-
emitter.on("
|
|
61
|
+
emitter.on("close", (arg, arg2) => {
|
|
59
62
|
console.log("queue_listener: emitter closed, model:", model_name, "retrying in 500ms")
|
|
60
63
|
console.log("args", arg, arg2)
|
|
61
64
|
// setTimeout(() => {
|
|
@@ -66,7 +69,7 @@ const register_model_emitter = (model_name) => {
|
|
|
66
69
|
|
|
67
70
|
|
|
68
71
|
const register_queue_listener = async() => {
|
|
69
|
-
mongoose.connection.
|
|
72
|
+
mongoose.connection.once("open", () => {
|
|
70
73
|
console.log("CONNEC OPEN")
|
|
71
74
|
// console.log("returning")
|
|
72
75
|
// return
|
|
@@ -84,7 +87,6 @@ const register_queue_listener = async() => {
|
|
|
84
87
|
})
|
|
85
88
|
|
|
86
89
|
console.log("ICICICICICIICICICICICI")
|
|
87
|
-
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
|