Release 1.2.2: recover missed PrestaShop status changes
This commit is contained in:
@@ -10,7 +10,7 @@ const { registerPrestashopPermissions } = require('./src/register-permissions');
|
||||
const { importOrdersForShop, syncPaymentsForShop } = require('./src/automation-jobs');
|
||||
const { createJobRuntime } = require('./src/job-runtime');
|
||||
const { ensureShopIcon } = require('./src/shop-icon');
|
||||
const { registerStatusSyncHook } = require('./src/status-sync');
|
||||
const { registerStatusSyncHook, reconcileOrderStatuses } = require('./src/status-sync');
|
||||
|
||||
const NEW_ORDERS_WINDOW_MS = 20 * 60 * 1000;
|
||||
// TTL locków cronowych w sekundach (jednostka oczekiwana przez Core.getLock/Core.extendLockTime).
|
||||
@@ -82,6 +82,10 @@ async function syncShopIcon() {
|
||||
}
|
||||
|
||||
const jobs = [
|
||||
new CronJob('15 * * * * *', () => runtime.track(() =>
|
||||
runtime.withRenewedLock('prestashop-status-reconciliation', JOB_LOCK_TTL_SECONDS, valid =>
|
||||
reconcileOrderStatuses({ Core, Log, PsOrder, loadConfig, apiFor }, valid))
|
||||
).catch(error => Log.error('PrestaShop status reconciliation worker failed', { error: error?.message }))),
|
||||
new CronJob('0 * * * * *', () => runtime.track(() =>
|
||||
runtime.withRenewedLock('prestashop-orders-puller', JOB_LOCK_TTL_SECONDS, runOrdersPuller)
|
||||
)),
|
||||
|
||||
Reference in New Issue
Block a user