You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The keepAlive option says to "use crawler.stop() to exit the crawler gracefully". stop() only halts dispatch; whatever is still queued stays queued. For the case keepAlive is usually reached for — a crawler fed by another crawler or an external producer — calling stop() when the producer finishes drops everything the consumer had not picked up yet (in a local test, 20 of 20).
Point the JSDoc at taskLoopOptions.isFinishedFunction with (await manager.checkReadiness()).status === 'finished' plus the producer's running flag, and say plainly what stop() does. stop({ drain: true }) would be nice but the doc fix is the important part.
keepAliveoption says to "usecrawler.stop()to exit the crawler gracefully".stop()only halts dispatch; whatever is still queued stays queued. For the casekeepAliveis usually reached for — a crawler fed by another crawler or an external producer — callingstop()when the producer finishes drops everything the consumer had not picked up yet (in a local test, 20 of 20).taskLoopOptions.isFinishedFunctionwith(await manager.checkReadiness()).status === 'finished'plus the producer'srunningflag, and say plainly whatstop()does.stop({ drain: true })would be nice but the doc fix is the important part.