-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat: Upgrade to Crawlee v0.5 #355
base: master
Are you sure you want to change the base?
Conversation
vdusek
commented
Dec 12, 2024
•
edited
Loading
edited
- service locator
- updates in proxy configuration
7e853dd
to
fa871b8
Compare
pyproject.toml
Outdated
@@ -45,7 +45,7 @@ keywords = [ | |||
python = "^3.9" | |||
apify-client = ">=1.8.1" | |||
apify-shared = ">=1.2.1" | |||
crawlee = "~0.4.0" | |||
crawlee = { git = "https://github.com/apify/crawlee-python.git", branch = "refactor-service-container" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update after crawlee 0.5 is released
src/apify/_actor.py
Outdated
if self._configuration.is_at_home: | ||
self._event_manager = PlatformEventManager( | ||
# We need to keep both local & cloud storage clients because of the `force_cloud` option. | ||
self._local_storage_client = MemoryStorageClient() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't the local storage client be kept in the service_locator
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the service locator we keep the needed one - based on the run environemnt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, but you can only ever force the cloud one, not the local one. So if you just didn't call service_locator.set_storage_client
when is_at_home is False
, you wouldn't need Actor._local_storage_client
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And what is the benefit of that? Setting the storage client in the service locator based on the "is at home" seems OK to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It gives the user the option to use whatever storage client they want when developing locally.
12256f3
to
89e28b6
Compare
89e28b6
to
18efd5d
Compare
18efd5d
to
37a1adf
Compare