See all the requests in a queue?
Hello - i build a request-queue using the following code:
for i,e in enumerate(inpCombinations):
newReq = Request.from_url(f"{baseLink}#{i}") newReq.user_data = {"search": list(e), "excluded": inpExcludedWords} await request_queue.add_request(newReq)
After this for-loop - how can i check how many requests if have in the queue? (in the above example i have 6 entries in inpCombinations so i expect to have 6 enrtries in the queue - but i would like to check this)
newReq = Request.from_url(f"{baseLink}#{i}") newReq.user_data = {"search": list(e), "excluded": inpExcludedWords} await request_queue.add_request(newReq)
After this for-loop - how can i check how many requests if have in the queue? (in the above example i have 6 entries in inpCombinations so i expect to have 6 enrtries in the queue - but i would like to check this)
1 Reply
Hello! Yes, you can retrieve information about the queue and its size by using the API. https://docs.apify.com/api/client/python/reference/class/RequestQueueClient#get
RequestQueueClient | API | API client for Python | Apify Documentation
Sub-client for manipulating a single request queue.