@rpcbase/server 0.107.0 → 0.109.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/cli/run_native.js +14 -0
- package/database.js +2 -1
- package/package.json +1 -1
- package/queue/dispatch_queue.js +1 -1
package/cli/run_native.js
CHANGED
|
@@ -91,6 +91,20 @@ const init_processes = (args) => {
|
|
|
91
91
|
...(args.verbose ? [] : ["--logfile", session_store_logs_path]),
|
|
92
92
|
]]
|
|
93
93
|
},
|
|
94
|
+
// server-store
|
|
95
|
+
{
|
|
96
|
+
name: "server-store",
|
|
97
|
+
dirs: [
|
|
98
|
+
session_store_dir,
|
|
99
|
+
path.dirname(session_store_logs_path),
|
|
100
|
+
],
|
|
101
|
+
cmd: ["redis-server", [
|
|
102
|
+
path.join(infrastructure_conf_dir, "./redis/redis.conf"),
|
|
103
|
+
"--dir", session_store_dir,
|
|
104
|
+
"--port", env.SERVER_STORE_PORT,
|
|
105
|
+
...(args.verbose ? [] : ["--logfile", session_store_logs_path]),
|
|
106
|
+
]]
|
|
107
|
+
},
|
|
94
108
|
// worker-queue
|
|
95
109
|
{
|
|
96
110
|
name: "worker-queue",
|
package/database.js
CHANGED
|
@@ -54,7 +54,8 @@ module.exports = async(...database_names) => {
|
|
|
54
54
|
keepAliveInitialDelay: 5000,
|
|
55
55
|
minPoolSize: 2,
|
|
56
56
|
// maxPoolSize: 1024 * 1024,
|
|
57
|
-
|
|
57
|
+
// TODO: setting this to a low value adds ~3s delay to requests... WHY
|
|
58
|
+
maxPoolSize: 32,
|
|
58
59
|
family: 4, // force ipv4
|
|
59
60
|
driverInfo: {
|
|
60
61
|
name: `${pack.name}/database`,
|
package/package.json
CHANGED
package/queue/dispatch_queue.js
CHANGED
|
@@ -11,7 +11,7 @@ const dispatch_queue = (queue, model_name, op, doc) => {
|
|
|
11
11
|
const tasks = queue.get_tasks()
|
|
12
12
|
|
|
13
13
|
const handler_name = `on_${op_names[op]}_${model_name.toLowerCase()}`
|
|
14
|
-
|
|
14
|
+
console.log("dispatch", handler_name)
|
|
15
15
|
// skip if there's no matching handler
|
|
16
16
|
if (!Object.keys(tasks).includes(handler_name)) return
|
|
17
17
|
|