1
0
Fork 0
mirror of synced 2024-07-03 21:40:55 +12:00

Use seconds instead of ms

This commit is contained in:
Adria Navarro 2024-01-08 12:51:29 +01:00
parent f7b74a3573
commit 13325b63a2

View file

@ -2,7 +2,7 @@
import { API } from "api"
export let onMigrationDone
export let timeoutMs = 180000 // 3 minutes
export let timeoutSeconds = 3 * 60 // 3 minutes
const loadTime = Date.now()
let timedOut = false
@ -11,6 +11,7 @@
setTimeout(async () => {
const response = await API.getMigrationStatus()
const timeoutMs = timeoutSeconds * 1000
if (!response.migrated) {
if (loadTime + timeoutMs > Date.now()) {
return checkMigrationsFinished()