Creating Process-wise ThreadLocalODMSession and MappedClass
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 30
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
class WikiPage(MappedClass):
class mongometa:
session = session
name = 'wiki_page'
_id = FieldProperty(schema.ObjectId)
title = FieldProperty(schema.String(required=True))
text = FieldProperty(schema.String(if_missing=''))
I am developing a multiprocess app . For each process, I would like to create a new ThreadLocalODMSession.
Given the above declarative method, how would I bind the MappedClass to different session?
I have already tried numerous ways but none seem to work.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing ThreadLocalODMSession and MappedClass through the repository, focusing on the declarative mongometa session binding shown in the issue. Determine how process-specific sessions are expected to bind to the same mapped class, then verify the behavior with the existing MongoDB ODM tests or add a focused test showing separate process sessions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mongodb, python
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100