(**kwargs)
Create new database engine per worker process.
Create new database engine per worker process.
Create new database engine per worker process .
def init_worker(**kwargs):
    """Create new database engine per worker process."""
    url = celery.conf.get('SQLALCHEMY_DATABASE_URI')
    engine = create_engine(url)
    db_session.configure(bind=engine)
def init_worker ( * * kwargs ) : url = celery . conf . get ( 'SQLALCHEMY_DATABASE_URI' ) engine = create_engine ( url ) db_session . configure ( bind = engine )