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 ?

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sqlalchemy/-/1jgi_sGQNcIJ.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to