feat(prestashop): delegate product ingestion to orders (1.1.13)

This commit is contained in:
fatequod
2026-09-22 10:49:24 +02:00
parent aa5297c5d8
commit 3030e9439c
7 changed files with 32 additions and 72 deletions
+6 -6
View File
@@ -29,7 +29,7 @@ test('first run safely starts at the newest order without backfilling history',
assert.deepEqual(result, { status: 'initialized', cursor: 812, processed: 0 });
});
test('a failed order is skipped so later orders can still be imported', async () => {
test('a failed order leaves a retryable cursor gap while later orders are still inspected', async () => {
const writes = [];
const imported = [];
const errors = [];
@@ -49,15 +49,15 @@ test('a failed order is skipped so later orders can still be imported', async ()
});
assert.deepEqual(imported, [11, 12, 13]);
assert.deepEqual(writes, [13]);
assert.equal(config.lastOrderId, 13);
assert.deepEqual(result, { status: 'processed', cursor: 13, processed: 2 });
assert.deepEqual(writes, [11]);
assert.equal(config.lastOrderId, 11);
assert.deepEqual(result, { status: 'processed', cursor: 11, processed: 2 });
assert.deepEqual(errors, [{
message: 'Failed to import PS order; skipping order and continuing',
message: 'Failed to import PS order; keeping cursor before the gap and continuing',
details: {
orderId: 12,
previousCursor: 11,
cursor: 12,
cursor: 11,
error: 'invalid order',
},
}]);