edit and re publist
This commit is contained in:
parent
fa51ddc304
commit
b3dd2579ff
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -162,7 +162,9 @@ export default function ProductModal({
|
|||
await productApi.customAction(
|
||||
response.data.id,
|
||||
"publist",
|
||||
response.data
|
||||
response.data,
|
||||
"POST",
|
||||
{ toast_success: false }
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue