@jetit/publisher 3.3.0 → 3.3.1
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 +2 -2
- package/src/lib/redis/streams.js +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetit/publisher",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@jetit/id": "0.0.11",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"rxjs": "^7.8.0"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"tslib": "
|
|
11
|
+
"tslib": "1.14.1"
|
|
12
12
|
},
|
|
13
13
|
"main": "./src/index.js"
|
|
14
14
|
}
|
package/src/lib/redis/streams.js
CHANGED
|
@@ -97,14 +97,15 @@ class Streams {
|
|
|
97
97
|
await this.publish(eventData);
|
|
98
98
|
}
|
|
99
99
|
else {
|
|
100
|
+
const key = (0, utils_1.encodeScheduledMessage)(eventData);
|
|
100
101
|
if (uniquePerInstance === true) {
|
|
101
|
-
const existingJob = await this.redisPublisher.zscore('se',
|
|
102
|
+
const existingJob = await this.redisPublisher.zscore('se', key);
|
|
102
103
|
if (existingJob) {
|
|
103
104
|
console.log(`PUBLISHER: Job with data '${eventData}' already exists. Skipping.`);
|
|
104
105
|
return;
|
|
105
106
|
}
|
|
106
107
|
}
|
|
107
|
-
await this.redisPublisher.zadd('se', scheduledTime.getTime(),
|
|
108
|
+
await this.redisPublisher.zadd('se', scheduledTime.getTime(), key);
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
111
|
/**
|