Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure the engine is idle even when multiple requests are scheduled at once #31

Merged
merged 1 commit into from
Dec 31, 2023

Conversation

milk1000cc
Copy link
Contributor

If the crawler has multiple start_urls or yields multiple requests at once, the engine does not seem to terminate even if the process finishes successfully.

class ExampleCrawler < Vessel::Cargo
  start_urls(
    "https://example.com/1" => :parse,
    "https://example.com/2" => :parse
  )

  def parse
    yield [
      request(url: "https://example.com/3", handler: :parse),
      request(url: "https://example.com/4", handler: :parse)
    ]
  end
end

The number of req_enqueued to be increased when scheduling seems to be wrong.

@route route merged commit c0fdbed into rubycdp:main Dec 31, 2023
4 checks passed
@route
Copy link
Member

route commented Dec 31, 2023

Right you are) thanks!

@milk1000cc milk1000cc deleted the fix/ensure-engine-is-idle branch December 31, 2023 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants