mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-09-07 00:17:17 +08:00
add delay for no position when have traversed all job
This commit is contained in:
@@ -750,6 +750,8 @@ async function toRecommendPage (hooks) {
|
|||||||
currentExceptJobIndex + 1 >= expectJobList.length
|
currentExceptJobIndex + 1 >= expectJobList.length
|
||||||
) {
|
) {
|
||||||
hooks.noPositionFoundForCurrentJob?.call()
|
hooks.noPositionFoundForCurrentJob?.call()
|
||||||
|
hooks.noPositionFoundAfterTraverseAllJob?.call()
|
||||||
|
await sleep((20 + 30 * Math.random()) * 1000)
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
page.reload(),
|
page.reload(),
|
||||||
page.waitForNavigation()
|
page.waitForNavigation()
|
||||||
@@ -757,8 +759,7 @@ async function toRecommendPage (hooks) {
|
|||||||
currentExceptJobIndex = INIT_START_EXCEPT_JOB_INDEX
|
currentExceptJobIndex = INIT_START_EXCEPT_JOB_INDEX
|
||||||
} else {
|
} else {
|
||||||
hooks.noPositionFoundForCurrentJob?.call()
|
hooks.noPositionFoundForCurrentJob?.call()
|
||||||
hooks.noPositionFoundAfterTraverseAllJob?.call()
|
await sleep((10 + 15 * Math.random()) * 1000)
|
||||||
|
|
||||||
currentExceptJobIndex += 1
|
currentExceptJobIndex += 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user