Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Less mongo connections #187

Merged
merged 4 commits into from
Sep 8, 2020

Conversation

iLLiCiTiT
Copy link
Member

@iLLiCiTiT iLLiCiTiT commented Sep 8, 2020

New PR to release. Moved from PRhttps://github.com//pull/186

Changes

  • Extracted basic MongoDB connection logic out of io in way to be reusable in different context than avalon's singleton and do not overcreate mongo connections

  • created singleton based class AvalonMongoConnection for handling mongo connection

  • to be able use different contexts was implemented AvalonMongoDB which holds Session attribute where avalon context is held

  • when multiple objects of AvalonMongoDB are installed and one of them will uninstall the connection to mongo remains

    • connection to mongo is closed when all installed AvalonMongoDB change state to uninstalled
  • this way we can reduce created connections per process

This depends on
pype ynput/OpenPype#509
pype-setup ynput/pype-setup#69

@iLLiCiTiT iLLiCiTiT self-assigned this Sep 8, 2020
@iLLiCiTiT iLLiCiTiT requested a review from a team September 8, 2020 13:34
@mkolar mkolar added this to the 2.12 milestone Sep 8, 2020
@mkolar mkolar merged commit 8373071 into release/2.12.0-rc-pype Sep 8, 2020
@mkolar mkolar deleted the feature/less_mongo_connections branch October 18, 2020 21:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants