From 8347fb0f77a6d1d46ee1395e1f4489c249e6e59f Mon Sep 17 00:00:00 2001 From: geekgeekrun Date: Sat, 26 Apr 2025 11:08:51 +0800 Subject: [PATCH] add delay for no position when have traversed all job --- packages/geek-auto-start-chat-with-boss/index.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/geek-auto-start-chat-with-boss/index.mjs b/packages/geek-auto-start-chat-with-boss/index.mjs index b7348d0..c358ac4 100644 --- a/packages/geek-auto-start-chat-with-boss/index.mjs +++ b/packages/geek-auto-start-chat-with-boss/index.mjs @@ -750,6 +750,8 @@ async function toRecommendPage (hooks) { currentExceptJobIndex + 1 >= expectJobList.length ) { hooks.noPositionFoundForCurrentJob?.call() + hooks.noPositionFoundAfterTraverseAllJob?.call() + await sleep((20 + 30 * Math.random()) * 1000) await Promise.all([ page.reload(), page.waitForNavigation() @@ -757,8 +759,7 @@ async function toRecommendPage (hooks) { currentExceptJobIndex = INIT_START_EXCEPT_JOB_INDEX } else { hooks.noPositionFoundForCurrentJob?.call() - hooks.noPositionFoundAfterTraverseAllJob?.call() - + await sleep((10 + 15 * Math.random()) * 1000) currentExceptJobIndex += 1 } }