@pi-r/redis 0.3.2 → 0.5.2

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/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2023 Studio Trigger
1
+ Copyright 2023 Wit Studio
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
4
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @pi-r/redis
2
2
 
3
- PEP 402 - Forever Aina
3
+ PEP 402 - Forever Vivy
4
4
 
5
5
  ## LICENSE
6
6
 
package/client/index.js CHANGED
@@ -109,7 +109,7 @@ async function setCredential(item) {
109
109
  const config = this.getPoolConfig("redis", password);
110
110
  const poolOptions = client.isolationPoolOptions || (client.isolationPoolOptions = {});
111
111
  if (config) {
112
- const { min, max, idle, queue_max, queue_idle } = config;
112
+ const { min, max, idle, queue_max, queue_idle, timeout } = config;
113
113
  if (min >= 0) {
114
114
  poolOptions.min ?? (poolOptions.min = min);
115
115
  }
@@ -123,7 +123,10 @@ async function setCredential(item) {
123
123
  poolOptions.maxWaitingClients ?? (poolOptions.maxWaitingClients = queue_max);
124
124
  }
125
125
  if (queue_idle > 0) {
126
- poolOptions.acquireTimeoutMillis ?? (poolOptions.acquireTimeoutMillis = queue_idle);
126
+ poolOptions.softIdleTimeoutMillis ?? (poolOptions.softIdleTimeoutMillis = queue_idle);
127
+ }
128
+ if (timeout > 0) {
129
+ poolOptions.acquireTimeoutMillis ?? (poolOptions.acquireTimeoutMillis = timeout);
127
130
  }
128
131
  }
129
132
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-r/redis",
3
- "version": "0.3.2",
3
+ "version": "0.5.2",
4
4
  "description": "Redis client driver for E-mc.",
5
5
  "main": "client/index.js",
6
6
  "types": "client/index.d.ts",
@@ -21,8 +21,8 @@
21
21
  "license": "MIT",
22
22
  "homepage": "https://github.com/anpham6/pi-r#readme",
23
23
  "dependencies": {
24
- "@e-mc/db": "^0.6.1",
25
- "@e-mc/types": "^0.6.1",
24
+ "@e-mc/db": "^0.7.2",
25
+ "@e-mc/types": "^0.7.2",
26
26
  "redis": "^4.6.13"
27
27
  }
28
28
  }