Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

feat: Upgrade to Crawlee v0.5 #355

wants to merge 2 commits into from

Conversation

vdusek
Copy link
Contributor

@vdusek vdusek commented Dec 12, 2024

  • service locator
  • updates in proxy configuration

@vdusek vdusek self-assigned this Dec 12, 2024
@vdusek vdusek force-pushed the adapt-service-locator branch from 7e853dd to fa871b8 Compare December 12, 2024 12:51
@github-actions github-actions bot added this to the 104th sprint - Tooling team milestone Dec 12, 2024
@github-actions github-actions bot added t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics. labels Dec 12, 2024
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" }
Copy link
Contributor Author

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

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()
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

@vdusek vdusek force-pushed the adapt-service-locator branch from 12256f3 to 89e28b6 Compare December 13, 2024 14:33
@vdusek vdusek changed the title chore: adapt to use service locator from crawlee chore: Integrate service locator from Crawlee Dec 13, 2024
@vdusek vdusek force-pushed the adapt-service-locator branch from 89e28b6 to 18efd5d Compare December 17, 2024 10:14
@vdusek vdusek changed the title chore: Integrate service locator from Crawlee feat: Upgrade to Crawlee v0.5 Dec 17, 2024
@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. enhancement New feature or request. labels Dec 17, 2024
@vdusek vdusek force-pushed the adapt-service-locator branch from 18efd5d to 37a1adf Compare December 17, 2024 10:48
@vdusek vdusek marked this pull request as ready for review December 17, 2024 11:46
@vdusek vdusek requested a review from janbuchar December 17, 2024 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adhoc Ad-hoc unplanned task added during the sprint. enhancement New feature or request. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants