Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/apify/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,15 @@ class Configuration(CrawleeConfiguration):
description='TCP port for the Actor to start an HTTP server to receive messages in the Actor Standby mode',
),
deprecated('Use `web_server_port` instead'),
] = 4322
] = 4321

standby_url: Annotated[
str,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Crawlee, we use a custom URL validator function:

    url: Annotated[str, BeforeValidator(validate_http_url), Field(...)]

https://github.com/apify/crawlee-python/blob/v0.3.8/src/crawlee/_request.py#L112

@jirimoravcik Could we use the same approach here as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

Field(
alias='actor_standby_url',
description='URL for accessing web servers of Actor runs in Standby mode',
),
]

token: Annotated[
str | None,
Expand Down Expand Up @@ -296,7 +304,7 @@ class Configuration(CrawleeConfiguration):
'actor_web_server_url',
'apify_container_url',
),
description='Unique public URL for accessing the Actor run web server from the outside world',
description='Unique public URL for accessing a specific Actor run web server from the outside world.',
),
] = 'http://localhost:4321'

Expand Down
Loading