From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH proxmox-datacenter-manager 2/2] server: parallel fetcher: refactor: use helpers for common operations
Date: Fri, 29 Aug 2025 14:33:29 +0200 [thread overview]
Message-ID: <20250829123330.184123-3-s.hanreich@proxmox.com> (raw)
In-Reply-To: <20250829123330.184123-1-s.hanreich@proxmox.com>
The introduction of the helper that executes the callback once per
remote factored out some common functionality from existing helpers.
Adapt the existing helper that queries all nodes to also use those
helpers to avoid duplicated code.
No functional changes intended.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
server/src/parallel_fetcher.rs | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/server/src/parallel_fetcher.rs b/server/src/parallel_fetcher.rs
index e55cc25..5f6a317 100644
--- a/server/src/parallel_fetcher.rs
+++ b/server/src/parallel_fetcher.rs
@@ -223,16 +223,7 @@ impl<C: Clone + Send + 'static> ParallelFetcher<C> {
match remote.ty {
RemoteType::Pve => {
- let remote_clone = remote.clone();
-
- let nodes = match async move {
- let client = connection::make_pve_client(&remote_clone)?;
- let nodes = client.list_nodes().await?;
-
- Ok::<Vec<ClusterNodeIndexResponse>, Error>(nodes)
- }
- .await
- {
+ let nodes = match Self::fetch_pve_node_list(&remote).await {
Ok(nodes) => nodes,
Err(err) => return (remote.id.clone(), Err(err)),
};
--
2.47.2
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next prev parent reply other threads:[~2025-08-29 12:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-29 12:33 [pdm-devel] [RFC proxmox-datacenter-manager 0/2] Add a helper for fetching from multiple remotes once Stefan Hanreich
2025-08-29 12:33 ` [pdm-devel] [PATCH proxmox-datacenter-manager 1/2] server: add helper for fetching results from one node per remote Stefan Hanreich
2025-08-29 12:33 ` Stefan Hanreich [this message]
2025-08-29 13:29 ` [pdm-devel] [RFC proxmox-datacenter-manager 0/2] Add a helper for fetching from multiple remotes once Lukas Wagner
2025-08-29 14:12 ` [pdm-devel] superseded: " Lukas Wagner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250829123330.184123-3-s.hanreich@proxmox.com \
--to=s.hanreich@proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.