update config future

This commit is contained in:
Admin 2025-05-12 14:25:52 +07:00
parent eb71c9f3ed
commit 4020aef7f6
1 changed files with 16 additions and 0 deletions

View File

@ -25,6 +25,8 @@ let MANAGER_BIDS = [];
const activeTasks = new Set();
let timeToUpdateLogin = new Date().toUTCString();
const handleUpdateProductTabs = (data) => {
if (!Array.isArray(data)) {
console.log("Data must be array");
@ -404,6 +406,8 @@ const trackingLoginStatus = async () => {
const results = await Promise.allSettled(
MANAGER_BIDS.map(async (item) => {
try {
if (!isTimeReached(timeToUpdateLogin)) return;
const login_status = await item.isLogin();
await updateLoginStatus({
@ -414,6 +418,18 @@ const trackingLoginStatus = async () => {
},
login_status,
});
console.log(
"%cindex.js:422 ehehehehehe",
"color: #007acc;",
"ehehehehehe"
);
// Set time to update login sau 1 phút
const now = new Date();
const oneMinuteLater = new Date(now.getTime() + 60 * 1000);
timeToUpdateLogin = oneMinuteLater;
} catch (err) {
console.warn(
`[⚠️ WARN] Failed to check login for bid ${