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

Issue in holding DB connection consistently #698

Open
kushal-chaurasia-godeskless opened this issue Jan 18, 2024 · 1 comment
Open

Issue in holding DB connection consistently #698

kushal-chaurasia-godeskless opened this issue Jan 18, 2024 · 1 comment

Comments

@kushal-chaurasia-godeskless

So i have Django 2.2.6 psycopg2-binary===2.8.6 and python version 3.9.7 and when my celery task is getting executed I want to set tenant so for that i am querying in Client table and intermittently i am not able to find data in DB even tough data exist in my db what should i do

@jeroenbrouwer
Copy link

Write a wrapper around running your celery tasks, store the schema_name / tenant for which the task must run and run your task within a with schema_context(schema_name) context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants