qdone 2.0.38-alpha → 2.0.39-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.
@@ -278,7 +278,7 @@ async function sendMessageBatch(qrl, messages, opt) {
278
278
  const results = await Promise.all(promises);
279
279
  params.Entries = results.filter(({ shouldEnqueue }) => shouldEnqueue).map(({ m }) => m);
280
280
  if (!params.Entries.length)
281
- return;
281
+ return { Failed: [], Successful: [] };
282
282
  }
283
283
  // Send them
284
284
  const client = (0, sqs_js_1.getSQSClient)();
@@ -217,7 +217,7 @@ class JobExecutor {
217
217
  console.log(JSON.stringify({ event: 'DELETE_MESSAGES', timestamp: start, count, qrl }));
218
218
  }
219
219
  // Mark batch as processed for dedup
220
- await Promise.all(result.Successful.map(e => (0, dedup_js_1.dedupSuccessfullyProcessed)(this.jobsByMessageId[e.Id], this.opt)));
220
+ await Promise.all(result.Successful.map(e => (0, dedup_js_1.dedupSuccessfullyProcessed)(this.jobsByMessageId[e.Id].message, this.opt)));
221
221
  }
222
222
  debug('DeleteMessageBatch returned', result);
223
223
  // TODO Sentry
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qdone",
3
- "version": "2.0.38-alpha",
3
+ "version": "2.0.39-alpha",
4
4
  "description": "A distributed scheduler for SQS",
5
5
  "type": "module",
6
6
  "main": "./index.js",
package/src/enqueue.js CHANGED
@@ -276,7 +276,7 @@ export async function sendMessageBatch (qrl, messages, opt) {
276
276
  const promises = params.Entries.map(async m => ({ m, shouldEnqueue: await dedupShouldEnqueue(m, opt) }))
277
277
  const results = await Promise.all(promises)
278
278
  params.Entries = results.filter(({ shouldEnqueue }) => shouldEnqueue).map(({ m }) => m)
279
- if (!params.Entries.length) return
279
+ if (!params.Entries.length) return { Failed: [], Successful: [] }
280
280
  }
281
281
 
282
282
  // Send them
@@ -224,7 +224,7 @@ export class JobExecutor {
224
224
  // Mark batch as processed for dedup
225
225
  await Promise.all(
226
226
  result.Successful.map(
227
- e => dedupSuccessfullyProcessed(this.jobsByMessageId[e.Id], this.opt)
227
+ e => dedupSuccessfullyProcessed(this.jobsByMessageId[e.Id].message, this.opt)
228
228
  )
229
229
  )
230
230
  }