Skip to content

Commit 434ab5b

Browse files
committed
Update after crawlee update
1 parent caf9e23 commit 434ab5b

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

docs/03_concepts/code/03_rq.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,10 @@ async def main() -> None:
2020

2121
# If you try to add an existing request again, it will not do anything
2222
add_request_info = await queue.add_request(
23-
Request.from_url('http://different-example.com/5')
23+
Request.from_url('http://example.com/5')
2424
)
2525
Actor.log.info(f'Add request info: {add_request_info}')
2626

27-
processed_request = await queue.get_request(add_request_info.id)
28-
Actor.log.info(f'Processed request: {processed_request}')
29-
3027
# Finally, process the queue until all requests are handled
3128
while not await queue.is_finished():
3229
# Fetch the next unhandled request in the queue
@@ -51,3 +48,6 @@ async def main() -> None:
5148
# processed again.
5249
Actor.log.warning('Request failed, will retry!')
5350
await queue.reclaim_request(request)
51+
52+
53+
asyncio.run(main())

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ keywords = [
3636
dependencies = [
3737
"apify-client>=2.0.0,<3.0.0",
3838
"apify-shared>=2.0.0,<3.0.0",
39-
"crawlee@git+https://github.com/apify/crawlee-python.git@remove-request-id",
39+
"crawlee@git+https://github.com/apify/crawlee-python.git@master",
4040
"cachetools>=5.5.0",
4141
"cryptography>=42.0.0",
4242
"httpx>=0.27.0",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# The test fixture will put the Apify SDK wheel path on the next line
22
APIFY_SDK_WHEEL_PLACEHOLDER
33
uvicorn[standard]
4-
crawlee[parsel] @ git+https://github.com/apify/crawlee-python.git@remove-request-id
4+
crawlee[parsel] @ git+https://github.com/apify/crawlee-python.git@master

tests/integration/test_actor_request_queue.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ async def test_force_cloud(
8585
) -> None:
8686
request_queue_id = (await apify_named_rq.get_metadata()).id
8787
request_info = await apify_named_rq.add_request(Request.from_url('http://example.com'))
88+
assert request_info.id is not None
8889
request_queue_client = apify_client_async.request_queue(request_queue_id)
8990

9091
request_queue_details = await request_queue_client.get()

uv.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)