!TTseFeHXzHzpLDomvN:matrix.org

#rust-br

1237 Members
Receitas https://rust-lang-nursery.github.io/rust-cookbook/ | http://www.arewewebyet.org/ | Outros canais: #rust #rust-begginers +rust:matrix.org | Grupo no telegram @rustlang-br | Tenha notificações no IRC e logs em https://riot.im/app/#/room/#rust-br:matrix.org33 Servers

Load older messages


SenderMessageTime
25 May 2018
@telegram_527815475:t2bot.ioU P (Telegram)O objetivo era modificar TopologyDescription => Server=> ConnectionPool21:18:55
@telegram_527815475:t2bot.ioU P (Telegram)Não conseguir de forma alguma ajustar sem modificar no construtor...21:19:58
@telegram_70068978:t2bot.ioAlexandr̸̶͉͇̟ͫ͑ͤ᷃̄̔̌̕͢ͅȅ͙ ̮̫̑̎᷇̎͆᷇᷁ͩ̾ (Telegram)Mas vc quer é mexer com a topologia msm?21:21:30
@telegram_527815475:t2bot.ioU P (Telegram)Não21:23:36
@telegram_527815475:t2bot.ioU P (Telegram)impl TopologyDescriptionLocal for TopologyDescription { /// Returns a default, unknown topology description. fn create(connector: StreamConnector, host_name: String, port: u16, pool_size: usize) -> TopologyDescription { let mut description = TopologyDescription::new(connector.clone()); let mut client = Client::connect(&host_name, port).expect("Failed to initialize standalone client."); let mut host = Host::create(host_name, port); let top_arc = Arc::new(RwLock::new(description.clone())); let server = Server::create(client.clone(), host.clone(), top_arc, false, connector.clone(), pool_size); let mut host_map = HashMap::new(); host_map.insert(host.clone(), server.clone()); description.set_servers(host_map); description } fn set_servers(&mut self, servers: HashMap<Host, Server>){ self.servers = servers; } }21:23:38
@telegram_527815475:t2bot.ioU P (Telegram)pool_size meu objetivo, problema contrutor, create novo fn para construção21:24:45
@telegram_70068978:t2bot.ioAlexandr̸̶͉͇̟ͫ͑ͤ᷃̄̔̌̕͢ͅȅ͙ ̮̫̑̎᷇̎͆᷇᷁ͩ̾ (Telegram)Então, vc quer é fazer as paradas normais né? Insert, find, talz? Ignora esse Server aí que isso é outra coisa21:25:19
@telegram_188616199:t2bot.ioEliastipo21:25:31
@telegram_188616199:t2bot.ioEliasnão tem API na lib pra fazer oq ele quer21:25:39
@telegram_188616199:t2bot.ioEliassimples assim21:25:42
@telegram_70068978:t2bot.ioAlexandr̸̶͉͇̟ͫ͑ͤ᷃̄̔̌̕͢ͅȅ͙ ̮̫̑̎᷇̎͆᷇᷁ͩ̾ (Telegram)É, mas ele tá indo pro lado errado tbm21:25:55
@telegram_70068978:t2bot.ioAlexandr̸̶͉͇̟ͫ͑ͤ᷃̄̔̌̕͢ͅȅ͙ ̮̫̑̎᷇̎͆᷇᷁ͩ̾ (Telegram)N adianta modificar esse pool_size do server, que n é oq ele quer de verdade21:26:10
@telegram_527815475:t2bot.ioU P (Telegram) Reply to Alexandr̸̶͉͇̟ͫ͑ͤ᷃̄̔̌̕͢ͅȅ͙ ̮̫̑̎᷇̎͆᷇᷁ͩ̾ (Telegram):
Então, vc quer é fazer as paradas normais né? Insert, find, talz? Ignora esse Server aí que isso é outra coisa

Isso já faço

21:26:13
@telegram_70068978:t2bot.ioAlexandr̸̶͉͇̟ͫ͑ͤ᷃̄̔̌̕͢ͅȅ͙ ̮̫̑̎᷇̎͆᷇᷁ͩ̾ (Telegram) Reply to U P (Telegram):
Isso já faço

Isso, só que vc quer modificar só a pool
Vc usa esse Server atualmente/

21:26:36
@telegram_527815475:t2bot.ioU P (Telegram)Como disse meu objetivo é alterar o pool.21:27:11
@telegram_527815475:t2bot.ioU P (Telegram)mas sem passar por esse caminho não consigo..21:27:25
@telegram_527815475:t2bot.ioU P (Telegram)Sacou...?21:27:36
@telegram_70068978:t2bot.ioAlexandr̸̶͉͇̟ͫ͑ͤ᷃̄̔̌̕͢ͅȅ͙ ̮̫̑̎᷇̎͆᷇᷁ͩ̾ (Telegram)Vc usa esse Server atualmente?21:27:47
@telegram_527815475:t2bot.ioU P (Telegram)Não! Mas sabe outro caminho para tentar modificar o pool_size?21:32:01
@telegram_188616199:t2bot.ioEliasforka e muda a quantidade padrão de conexões, q vc n precisa programar nada21:32:59
@telegram_188616199:t2bot.ioEliashttps://docs.rs/mongodb/0.3.7/mongodb/pool/static.DEFAULT_POOL_SIZE.html21:33:13
@telegram_527815475:t2bot.ioU P (Telegram)Já tinha visto, vou alterar mesmo o modificador de acesso21:34:52
@telegram_70068978:t2bot.ioAlexandr̸̶͉͇̟ͫ͑ͤ᷃̄̔̌̕͢ͅȅ͙ ̮̫̑̎᷇̎͆᷇᷁ͩ̾ (Telegram) Reply to U P (Telegram):
Não!
Mas sabe outro caminho para tentar modificar o pool_size?

Então, oq eu estou dizendo é que n adianta modificar o pool_size nessa Struct server, pq n tem nada a ver com oq vc quer
MAS ainda n tem como usar a ConnectionPool pra conectar

21:35:00
@telegram_527815475:t2bot.ioU P (Telegram)Tem sim21:35:54
@telegram_527815475:t2bot.ioU P (Telegram)let config = ConnectionString::new(&"localhost".to_string(), 27017); let mut top = TopologyDescription::create(StreamConnector::default(),"localhost".to_string(), 27017, 1000usize); let top_arc = Arc::new(RwLock::new(top.clone())); let description = Arc::new(RwLock::new(ServerDescription::new())); let host = &config.clone().hosts[0]; let client = Client::connect("localhost", 27017) .expect("Failed to initialize standalone client."); //top.add_missing_hosts(description, client, top_arc, false); top.update(host.clone(), description, client, top_arc); let client = Client::with_config(config, None, Some(top)).unwrap();21:35:55
@telegram_527815475:t2bot.ioU P (Telegram)top.update faz a magica ...21:38:46
@telegram_527815475:t2bot.ioU P (Telegram)ai passo para o client21:38:58
@telegram_527815475:t2bot.ioU P (Telegram)De qq forma fico grato pela ajuda de todos22:12:19
@mozilla_mib_2r4xvv:matrix.orgmib_2r4xvv (IRC) joined the room.23:22:04
@mozilla_mib_2r4xvv:matrix.orgmib_2r4xvv (IRC) left the room.23:22:07

There are no newer messages yet.


Back to Room ListRoom Version: