On Friday, June 22, 2018 at 1:32:15 PM UTC-4, HP3 wrote:... but I'll 2x 
check!
 

> (I recall that task-inheritance in celery makes certain things happen 
> before and others after the fork - I am using prefork) 
>

i don't use pyramid_celery, but my own pyramid and celery integration...

looking at my code, i use an event decorator to catch the fork and issue a 
dispose

@worker_process_init.connect
def mycelery_atfork(signal=None, sender=None, **named):
    getengine().dispose()



i have NO idea if this will work for you.  My code hits the database before 
the fork, so I needed to do this.

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to