

def _start(self, conf=False, connection=None, slave_connection=None):
    with self._start_lock:
        if self._started:
            return
        if (conf is False):
            conf = cfg.CONF
        if (conf is not None):
            conf.register_opts(options.database_opts, 'database')
        url_args = self._url_args_for_conf(conf)
        if connection:
            url_args['connection'] = connection
        if slave_connection:
            url_args['slave_connection'] = slave_connection
        engine_args = self._engine_args_for_conf(conf)
        maker_args = self._maker_args_for_conf(conf)
        maker_args['autocommit'] = maker_args.pop('__autocommit')
        (self._writer_engine, self._writer_maker) = self._setup_for_connection(url_args['connection'], engine_args, maker_args)
        if url_args.get('slave_connection'):
            (self._reader_engine, self._reader_maker) = self._setup_for_connection(url_args['slave_connection'], engine_args, maker_args)
        else:
            (self._reader_engine, self._reader_maker) = (self._writer_engine, self._writer_maker)
        self.synchronous_reader = self._facade_cfg['synchronous_reader']
        self._started = True

dataset/ETHPy150Open openstack/oslo.db/oslo_db/sqlalchemy/enginefacade.py _TransactionFactory._start/original