@hotmeshio/hotmesh 0.1.4 → 0.1.5
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/build/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hotmeshio/hotmesh",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Unbreakable Workflows",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"test:interrupt": "NODE_ENV=test jest ./tests/functional/interrupt/index.test.ts --detectOpenHandles --forceExit --verbose",
|
|
49
49
|
"test:parallel": "NODE_ENV=test jest ./tests/functional/parallel/index.test.ts --detectOpenHandles --forceExit --verbose",
|
|
50
50
|
"test:pipe": "NODE_ENV=test jest ./tests/unit/services/pipe/index.test.ts --detectOpenHandles --forceExit --verbose",
|
|
51
|
-
"test:quorum": "NODE_ENV=test jest ./tests/functional/quorum/index.test.ts --detectOpenHandles --forceExit --verbose",
|
|
51
|
+
"test:quorum": "HMSH_IS_CLUSTER=true NODE_ENV=test jest ./tests/functional/quorum/index.test.ts --detectOpenHandles --forceExit --verbose",
|
|
52
52
|
"test:reclaim": "NODE_ENV=test jest ./tests/functional/reclaim/index.test.ts --detectOpenHandles --forceExit --verbose",
|
|
53
53
|
"test:redeploy": "NODE_ENV=test jest ./tests/functional/redeploy/index.test.ts --detectOpenHandles --forceExit --verbose",
|
|
54
54
|
"test:reentrant": "NODE_ENV=test jest ./tests/functional/reentrant/index.test.ts --detectOpenHandles --forceExit --verbose",
|
|
@@ -112,7 +112,7 @@ class HotMeshService {
|
|
|
112
112
|
if (options.guid) {
|
|
113
113
|
throttleMessage.guid = options.guid;
|
|
114
114
|
}
|
|
115
|
-
|
|
115
|
+
if (options.topic !== undefined) {
|
|
116
116
|
throttleMessage.topic = options.topic;
|
|
117
117
|
}
|
|
118
118
|
await this.engine.store.setThrottleRate(throttleMessage);
|
|
@@ -1010,15 +1010,16 @@ class StoreService {
|
|
|
1010
1010
|
if (options.guid) {
|
|
1011
1011
|
return;
|
|
1012
1012
|
}
|
|
1013
|
-
//if a topic, update
|
|
1013
|
+
//if a topic, update one
|
|
1014
|
+
const rate = options.throttle.toString();
|
|
1014
1015
|
if (options.topic) {
|
|
1015
|
-
await this.redisClient[this.commands.hset](key, options.topic
|
|
1016
|
+
await this.redisClient[this.commands.hset](key, { [options.topic]: rate });
|
|
1016
1017
|
}
|
|
1017
1018
|
else {
|
|
1018
1019
|
//if no topic, update all
|
|
1019
1020
|
const multi = this.getMulti();
|
|
1020
1021
|
multi[this.commands.del](key);
|
|
1021
|
-
multi[this.commands.hset](key, ':'
|
|
1022
|
+
multi[this.commands.hset](key, { ':': rate });
|
|
1022
1023
|
await multi.exec();
|
|
1023
1024
|
}
|
|
1024
1025
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hotmeshio/hotmesh",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Unbreakable Workflows",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"test:interrupt": "NODE_ENV=test jest ./tests/functional/interrupt/index.test.ts --detectOpenHandles --forceExit --verbose",
|
|
49
49
|
"test:parallel": "NODE_ENV=test jest ./tests/functional/parallel/index.test.ts --detectOpenHandles --forceExit --verbose",
|
|
50
50
|
"test:pipe": "NODE_ENV=test jest ./tests/unit/services/pipe/index.test.ts --detectOpenHandles --forceExit --verbose",
|
|
51
|
-
"test:quorum": "NODE_ENV=test jest ./tests/functional/quorum/index.test.ts --detectOpenHandles --forceExit --verbose",
|
|
51
|
+
"test:quorum": "HMSH_IS_CLUSTER=true NODE_ENV=test jest ./tests/functional/quorum/index.test.ts --detectOpenHandles --forceExit --verbose",
|
|
52
52
|
"test:reclaim": "NODE_ENV=test jest ./tests/functional/reclaim/index.test.ts --detectOpenHandles --forceExit --verbose",
|
|
53
53
|
"test:redeploy": "NODE_ENV=test jest ./tests/functional/redeploy/index.test.ts --detectOpenHandles --forceExit --verbose",
|
|
54
54
|
"test:reentrant": "NODE_ENV=test jest ./tests/functional/reentrant/index.test.ts --detectOpenHandles --forceExit --verbose",
|