Refactor event queue to allow multiple types of events
This commit is contained in:
@@ -37,14 +37,14 @@ export class ProductSyncer {
|
||||
this.log = (log ?? pino({ level: "silent" })).child({ component: "ProductSyncer" });
|
||||
}
|
||||
|
||||
async run(opt: ProductSyncerOptions = {}) {
|
||||
async syncApparel(opt: ProductSyncerOptions = {}) {
|
||||
const startDate = new Date();
|
||||
await opt.beforeStart?.(startDate);
|
||||
|
||||
if (opt.filter?.pProductIds)
|
||||
this.log.info({ pProductIds: opt.filter.pProductIds }, "sync started (filtered)");
|
||||
this.log.info({ pProductIds: opt.filter.pProductIds }, "apparel sync started (filtered)");
|
||||
else
|
||||
this.log.info("sync started (all)");
|
||||
this.log.info("apparel sync started (all)");
|
||||
|
||||
this.log.debug("retrieving webflow products");
|
||||
const allWProducts = await this.Webflow.Products.list({ forceAll: true });
|
||||
|
||||
Reference in New Issue
Block a user