async def _populate_misc_instance_data(cluster, conn): commands = dbops.CommandGroup() commands.add_commands([ dbops.CreateSchema(name='edgedbinstdata'), dbops.CreateTable( dbops.Table( name=('edgedbinstdata', 'instdata'), columns=[ dbops.Column( name='key', type='text', ), dbops.Column( name='bin', type='bytea', ), dbops.Column( name='text', type='text', ), dbops.Column( name='json', type='jsonb', ), ], constraints=[ dbops.PrimaryKey( table_name=('edgedbinstdata', 'instdata'), columns=['key'], ), ], )) ]) block = dbops.PLTopBlock() commands.generate(block) await _execute_block(conn, block) mock_auth_nonce = scram.generate_nonce() json_instance_data = { 'version': dict(buildmeta.get_version_dict()), 'catver': edbdef.EDGEDB_CATALOG_VERSION, 'mock_auth_nonce': mock_auth_nonce, } await _store_static_json_cache( cluster, 'instancedata', json.dumps(json_instance_data), ) instance_params = cluster.get_runtime_params().instance_params await _store_static_json_cache( cluster, 'backend_instance_params', json.dumps(instance_params._asdict()), ) return json_instance_data
async def _populate_misc_instance_data(cluster, conn): commands = dbops.CommandGroup() commands.add_commands([ dbops.CreateSchema(name='edgedbinstdata'), ]) block = dbops.PLTopBlock() commands.generate(block) await _execute_block(conn, block) mock_auth_nonce = scram.generate_nonce() json_instance_data = { 'version': dict(buildmeta.get_version_dict()), 'catver': edbdef.EDGEDB_CATALOG_VERSION, 'mock_auth_nonce': mock_auth_nonce, } await _store_static_json_cache( cluster, 'instancedata', json.dumps(json_instance_data), ) return json_instance_data
async def _populate_misc_instance_data(cluster): mock_auth_nonce = scram.generate_nonce() json_instance_data = { 'version': dict(buildmeta.get_version_dict()), 'catver': edbdef.EDGEDB_CATALOG_VERSION, 'mock_auth_nonce': mock_auth_nonce, } await _store_static_json_cache( cluster, 'instancedata', json.dumps(json_instance_data), ) return json_instance_data