redis-smq-common 1.0.0-rc.7 → 1.0.0-rc.8
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/CHANGELOG.md +5 -1
- package/dist/src/redis-client/clients/ioredis-client-multi.js +2 -1
- package/dist/src/redis-client/clients/node-redis-v3-client-multi.js +2 -2
- package/dist/src/redis-client/clients/node-redis-v4-client-multi.js +8 -1
- package/dist/src/redis-client/errors/watched-keys-changed.error.d.ts +4 -0
- package/dist/src/redis-client/errors/watched-keys-changed.error.js +11 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.IoredisClientMulti = void 0;
|
|
4
4
|
const redis_client_error_1 = require("../errors/redis-client.error");
|
|
5
|
+
const watched_keys_changed_error_1 = require("../errors/watched-keys-changed.error");
|
|
5
6
|
class IoredisClientMulti {
|
|
6
7
|
constructor(client) {
|
|
7
8
|
this.multi = client.multi();
|
|
@@ -71,7 +72,7 @@ class IoredisClientMulti {
|
|
|
71
72
|
if (err)
|
|
72
73
|
cb(err);
|
|
73
74
|
else if (!reply)
|
|
74
|
-
cb(new
|
|
75
|
+
cb(new watched_keys_changed_error_1.WatchedKeysChangedError());
|
|
75
76
|
else {
|
|
76
77
|
const lengths = [];
|
|
77
78
|
let err = null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NodeRedisV3ClientMulti = void 0;
|
|
4
|
-
const
|
|
4
|
+
const watched_keys_changed_error_1 = require("../errors/watched-keys-changed.error");
|
|
5
5
|
class NodeRedisV3ClientMulti {
|
|
6
6
|
constructor(client) {
|
|
7
7
|
this.multi = client.multi();
|
|
@@ -71,7 +71,7 @@ class NodeRedisV3ClientMulti {
|
|
|
71
71
|
if (err)
|
|
72
72
|
cb(err);
|
|
73
73
|
else if (!reply)
|
|
74
|
-
cb(new
|
|
74
|
+
cb(new watched_keys_changed_error_1.WatchedKeysChangedError());
|
|
75
75
|
else
|
|
76
76
|
cb(null, reply);
|
|
77
77
|
});
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NodeRedisV4ClientMulti = void 0;
|
|
4
|
+
const client_1 = require("@redis/client");
|
|
5
|
+
const watched_keys_changed_error_1 = require("../errors/watched-keys-changed.error");
|
|
4
6
|
class NodeRedisV4ClientMulti {
|
|
5
7
|
constructor(client) {
|
|
6
8
|
this.multi = client.multi();
|
|
@@ -69,7 +71,12 @@ class NodeRedisV4ClientMulti {
|
|
|
69
71
|
this.multi
|
|
70
72
|
.exec()
|
|
71
73
|
.then((reply) => cb(null, reply))
|
|
72
|
-
.catch(
|
|
74
|
+
.catch((err) => {
|
|
75
|
+
if (err instanceof client_1.WatchError)
|
|
76
|
+
cb(new watched_keys_changed_error_1.WatchedKeysChangedError());
|
|
77
|
+
else
|
|
78
|
+
cb(err);
|
|
79
|
+
});
|
|
73
80
|
}
|
|
74
81
|
}
|
|
75
82
|
exports.NodeRedisV4ClientMulti = NodeRedisV4ClientMulti;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WatchedKeysChangedError = void 0;
|
|
4
|
+
const redis_client_error_1 = require("./redis-client.error");
|
|
5
|
+
class WatchedKeysChangedError extends redis_client_error_1.RedisClientError {
|
|
6
|
+
constructor(msg = 'One (or more) of the watched keys has been changed') {
|
|
7
|
+
super(msg);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.WatchedKeysChangedError = WatchedKeysChangedError;
|
|
11
|
+
//# sourceMappingURL=watched-keys-changed.error.js.map
|
package/package.json
CHANGED