qdone 2.0.41-alpha → 2.0.42-alpha

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.
@@ -65,6 +65,10 @@ function addDedupParamsToMessage(message, opt, messageOptions) {
65
65
  if (!message.MessageDeduplicationId) {
66
66
  message.MessageDeduplicationId = getDeduplicationId(message.MessageBody, opt);
67
67
  }
68
+ else {
69
+ // Transform the incoming ID so that it fits SPS spec and is suitable for Redis
70
+ message.MessageDeduplicationId = getDeduplicationId(message.MessageDeduplicationId, opt);
71
+ }
68
72
  // Track our own dedup id so we can look it up upon ReceiveMessage
69
73
  if (opt.externalDedup) {
70
74
  message.MessageAttributes = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qdone",
3
- "version": "2.0.41-alpha",
3
+ "version": "2.0.42-alpha",
4
4
  "description": "A distributed scheduler for SQS",
5
5
  "type": "module",
6
6
  "main": "./index.js",
package/src/dedup.js CHANGED
@@ -58,6 +58,9 @@ export function addDedupParamsToMessage (message, opt, messageOptions) {
58
58
  // Fallback to using the message body
59
59
  if (!message.MessageDeduplicationId) {
60
60
  message.MessageDeduplicationId = getDeduplicationId(message.MessageBody, opt)
61
+ } else {
62
+ // Transform the incoming ID so that it fits SPS spec and is suitable for Redis
63
+ message.MessageDeduplicationId = getDeduplicationId(message.MessageDeduplicationId, opt)
61
64
  }
62
65
 
63
66
  // Track our own dedup id so we can look it up upon ReceiveMessage
@@ -230,7 +230,6 @@ export class JobExecutor {
230
230
  }
231
231
  debug('DeleteMessageBatch returned', result)
232
232
 
233
-
234
233
  // TODO Sentry
235
234
  }
236
235
  }