Use seconds instead of ms
This commit is contained in:
parent
f7b74a3573
commit
13325b63a2
|
@ -2,7 +2,7 @@
|
||||||
import { API } from "api"
|
import { API } from "api"
|
||||||
|
|
||||||
export let onMigrationDone
|
export let onMigrationDone
|
||||||
export let timeoutMs = 180000 // 3 minutes
|
export let timeoutSeconds = 3 * 60 // 3 minutes
|
||||||
|
|
||||||
const loadTime = Date.now()
|
const loadTime = Date.now()
|
||||||
let timedOut = false
|
let timedOut = false
|
||||||
|
@ -11,6 +11,7 @@
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
const response = await API.getMigrationStatus()
|
const response = await API.getMigrationStatus()
|
||||||
|
|
||||||
|
const timeoutMs = timeoutSeconds * 1000
|
||||||
if (!response.migrated) {
|
if (!response.migrated) {
|
||||||
if (loadTime + timeoutMs > Date.now()) {
|
if (loadTime + timeoutMs > Date.now()) {
|
||||||
return checkMigrationsFinished()
|
return checkMigrationsFinished()
|
||||||
|
|
Loading…
Reference in New Issue