Skip to content

Expire requests from request queue #2018

Closed Answered by barjin
abhisheksurve45 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @abhisheksurve45 and thank you for your interest in the Crawlee project!

You are right - there is no internal way of setting a per-request timeout, as we haven't seen any interest in this feature (until now). Would you mind sharing your use case for this feature?

Here I hacked together a better solution that creates a custom RequestQueue class with request expiration. You see you can implement your own RequestQueue class that inherits most of the methods from the original Crawlee's RequestQueue (renamed as RQ) - you only have to add wrappers for the methods that a) put requests in the queue and b) take requests out of the queue.

You can see that in my implementation, the addRequest(s)(…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by abhisheksurve45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants