fix!: Refactor service usage to rely on service_locator#691
Conversation
There was a problem hiding this comment.
Pull request is neither linked to an issue or epic nor labeled as adhoc!
janbuchar
left a comment
There was a problem hiding this comment.
Thanks for kicking this off!
|
We might want to try and resolve #369 here as well. Additional context in Apify Slack - https://apify.slack.com/archives/C02JQSN79V4/p1723708212887119 |
There was a problem hiding this comment.
Pull request is neither linked to an issue or epic nor labeled as adhoc!
|
Also apify/apify-sdk-python#324 (comment) is relevant here - if we could remove the need to initialize |
service_container exclusively [WIP]
c8747d6 to
bf427bd
Compare
service_container exclusively [WIP]service_container exclusively
4c8472c to
99f75de
Compare
service_container exclusivelyservice_container exclusively
service_container exclusivelyservice_container
Pijukatel
left a comment
There was a problem hiding this comment.
Looks good to me, but maybe @janbuchar should approve as well.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
5e39fcb to
c87c395
Compare
Description
service_containermodule has been completely refactored. It introduces changes to its usage, and resulting in many changes across the code base.service_containerinternally. They no longer store service instances themselves.forceflag has been added to theservice_container's setters, which is especially useful for testing purposes.memory_storage_client.set_storage_client, the same approach as for theevent_manager. This is more flexible (allows more envs than just local & cloud). And in the SDK Actor, we can them based on theis_at_home.service_containerinterface.Open discussion
service_container? Thoughts are welcome.service_container?service_locator?service_locatorIssues
service_container#699configurationargument #539Testing
service_container, have been updated to reflect these changes.MemoryStorageClientrespects theConfiguration.Manual reproduction
CrawlerandMemoryStorageClientrespects the customConfiguration.Checklist