diff --git a/auto-listing-facebook-marketplace/src/background.ts b/auto-listing-facebook-marketplace/src/background.ts index fcbdfd7..27bd3fc 100644 --- a/auto-listing-facebook-marketplace/src/background.ts +++ b/auto-listing-facebook-marketplace/src/background.ts @@ -292,7 +292,7 @@ const init = async () => { handleListenDeletes(); handleListenEdits(); ensureMarketplaceSellingTab(); - createAlarm(); + // createAlarm(); }; chrome.runtime.onMessage.addListener((message, sender) => { @@ -302,10 +302,10 @@ chrome.runtime.onMessage.addListener((message, sender) => { } }); -// Khởi tạo alarm (30–40 giây, random) +// Khởi tạo alarm (3–5 phút, random) function createAlarm() { - const delay = 30 + Math.floor(Math.random() * 11); // 30 → 40 giây - chrome.alarms.create("checkQueue", { delayInMinutes: delay / 60 }); + const delay = 3 + Math.floor(Math.random() * 3); // 3, 4, hoặc 5 phút + chrome.alarms.create("checkQueue", { delayInMinutes: delay }); } // Task reload extension (nằm trong queue) diff --git a/client/app/routes/products/components/modals/product-modal.tsx b/client/app/routes/products/components/modals/product-modal.tsx index 7b860b6..d592f9d 100644 --- a/client/app/routes/products/components/modals/product-modal.tsx +++ b/client/app/routes/products/components/modals/product-modal.tsx @@ -162,7 +162,9 @@ export default function ProductModal({ await productApi.customAction( response.data.id, "publist", - response.data + response.data, + "POST", + { toast_success: false } ); } }