You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sqlal...@googlegroups.com
Hi,
I'm using some DB operation inside my Celery tasks and i dont know which is good approach for accessing DB session in each task. Now i store in global celery config on start a DB session:
scoped_session(sessionmaker(bind=engine))
And each task takes that class from config and makes an instance. But maybe better would be to store directly in celery config a DB session instance ?