Fix set of clients
Reviewers: florijan Reviewed By: florijan Differential Revision: https://phabricator.memgraph.io/D1133
This commit is contained in:
parent
5ad39a8735
commit
ca32538f63
@ -54,12 +54,13 @@ class RpcWorkerClients {
|
||||
int skip_worker_id,
|
||||
std::function<TResult(communication::rpc::Client &)> execute) {
|
||||
std::vector<std::future<TResult>> futures;
|
||||
for (auto &client : clients_) {
|
||||
if (client.first == skip_worker_id) continue;
|
||||
for (auto &worker_id : coordination_.GetWorkerIds()) {
|
||||
if (worker_id == skip_worker_id) continue;
|
||||
auto &client = GetClient(worker_id);
|
||||
|
||||
futures.emplace_back(
|
||||
std::async(std::launch::async,
|
||||
[&execute, &client]() { return execute(client.second); }));
|
||||
[&execute, &client]() { return execute(client); }));
|
||||
}
|
||||
return futures;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user