edit and re publist
This commit is contained in:
parent
fa51ddc304
commit
b3dd2579ff
|
|
@ -292,7 +292,7 @@ const init = async () => {
|
||||||
handleListenDeletes();
|
handleListenDeletes();
|
||||||
handleListenEdits();
|
handleListenEdits();
|
||||||
ensureMarketplaceSellingTab();
|
ensureMarketplaceSellingTab();
|
||||||
createAlarm();
|
// createAlarm();
|
||||||
};
|
};
|
||||||
|
|
||||||
chrome.runtime.onMessage.addListener((message, sender) => {
|
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() {
|
function createAlarm() {
|
||||||
const delay = 30 + Math.floor(Math.random() * 11); // 30 → 40 giây
|
const delay = 3 + Math.floor(Math.random() * 3); // 3, 4, hoặc 5 phút
|
||||||
chrome.alarms.create("checkQueue", { delayInMinutes: delay / 60 });
|
chrome.alarms.create("checkQueue", { delayInMinutes: delay });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Task reload extension (nằm trong queue)
|
// Task reload extension (nằm trong queue)
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,9 @@ export default function ProductModal({
|
||||||
await productApi.customAction(
|
await productApi.customAction(
|
||||||
response.data.id,
|
response.data.id,
|
||||||
"publist",
|
"publist",
|
||||||
response.data
|
response.data,
|
||||||
|
"POST",
|
||||||
|
{ toast_success: false }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue