def _launch(need_conversion): """Launch the emulator and convert SQLite data if needed. Args: need_conversion: A bool. If True convert sqlite data to emulator data. """ emulator_manager.Launch(emulator_port, silent, index_file, require_indexes, datastore_path) if need_conversion: logging.info( 'Converting datastore_sqlite_stub data in %s to Cloud Datastore ' 'emulator data in %s.', sqlite_data_renamed, datastore_path) datastore_converter.convert_sqlite_data_to_emulator( app_id, sqlite_data_renamed, emulator_host) # Shutdown datastore emulator before dev_appserver quits. shutdown.extra_shutdown_callback.append(emulator_manager.Shutdown)
def _launch(need_conversion): """Launch the emulator and convert SQLite data if needed. Args: need_conversion: A bool. If True convert sqlite data to emulator data. """ emulator_manager.Launch( emulator_port, silent, index_file, require_indexes, datastore_path, ('SEQUENTIAL' if auto_id_policy == datastore_stub_util.SEQUENTIAL else 'SCATTERED')) if need_conversion: logging.info( 'Converting datastore_sqlite_stub data in %s to Cloud Datastore ' 'emulator data in %s.', sqlite_data_renamed, datastore_path) datastore_converter.convert_sqlite_data_to_emulator( app_id, sqlite_data_renamed, emulator_host) # Shutdown datastore emulator before dev_appserver quits. shutdown.extra_shutdown_callback.append(emulator_manager.Shutdown)