Wait for an existing forge before a new reforge
This commit is contained in:
parent
93533660bd
commit
54af46c25a
1 changed files with 10 additions and 6 deletions
|
|
@ -558,8 +558,10 @@ function createReplica(path, afterMap = false) {
|
||||||
const checkCanary = () =>
|
const checkCanary = () =>
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (!canaryPeep) {
|
if (!canaryPeep) {
|
||||||
forge()
|
isReady()
|
||||||
isReady().then(checkCanary)
|
.then(forge)
|
||||||
|
.then(isReady)
|
||||||
|
.then(checkCanary)
|
||||||
}
|
}
|
||||||
}, 30000)
|
}, 30000)
|
||||||
|
|
||||||
|
|
@ -575,10 +577,12 @@ function createReplica(path, afterMap = false) {
|
||||||
if (isPopulated(data) || _wait > 100000) {
|
if (isPopulated(data) || _wait > 100000) {
|
||||||
cb(data, key)
|
cb(data, key)
|
||||||
} else {
|
} else {
|
||||||
forge()
|
isReady()
|
||||||
isReady().then(() => {
|
.then(forge)
|
||||||
this.specialOnce(cb, _wait * 3)
|
.then(isReady)
|
||||||
})
|
.then(() => {
|
||||||
|
this.specialOnce(cb, _wait * 3)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ wait: _wait }
|
{ wait: _wait }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue