Delay exit program after crawl all request.

I'm currently running a PuppeteerCrawler with crawlee. After my code print "INFO PuppeteerCrawler: Crawl finished. Final request statistics". My program do not exit instantly, It's delay about 5 seconds. Can you help me explain and fix it? Thank you! Bellow is simple code await crawler.run([url]); console.log('done') It print "done", then about 5 seconds my program closes.
2 Replies
Pepa J
Pepa J2y ago
Hello @phuongpv , I am afraid that your code is not enough, do you call await Actor.exit() in your program?
foreign-sapphire
foreign-sapphireOP2y ago
Wow, It fixed. I miss both Actor.exit() and await Actor.init() in my program. Thank you so much!

Did you find this page helpful?