Фикс фронт
This commit is contained in:
parent
129af42019
commit
07aa2b59a9
@ -277,8 +277,19 @@
|
||||
}
|
||||
|
||||
|
||||
await updateMarkers();
|
||||
setInterval(updateMarkers, 3000);
|
||||
let isUpdating = false;
|
||||
|
||||
async function scheduledUpdate() {
|
||||
if (isUpdating) return; // Если уже выполняется запрос — пропускаем
|
||||
|
||||
isUpdating = true;
|
||||
await updateMarkers();
|
||||
isUpdating = false;
|
||||
|
||||
setTimeout(scheduledUpdate, 3000); // Запланировать следующий запрос
|
||||
}
|
||||
|
||||
scheduledUpdate(); // Первый запуск
|
||||
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user