[pdm-devel] [PATCH proxmox-datacenter-manager 15/15] remote-tasks: restrict function visibility
Lukas Wagner
l.wagner at proxmox.com
Tue Jan 28 13:25:20 CET 2025
These fuctions are never called from any other module, so we can
make them private.
Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
---
server/src/remote_tasks/mod.rs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/server/src/remote_tasks/mod.rs b/server/src/remote_tasks/mod.rs
index 5735f2f..49789c9 100644
--- a/server/src/remote_tasks/mod.rs
+++ b/server/src/remote_tasks/mod.rs
@@ -331,7 +331,7 @@ pub fn track_running_task(task: RemoteUpid) -> Option<JoinHandle<()>> {
/// Get a list of running foreign tasks
///
/// panics on a poisoned mutex
-pub fn get_running_tasks() -> Vec<RemoteUpid> {
+fn get_running_tasks() -> Vec<RemoteUpid> {
RUNNING_FOREIGN_TASKS
.read()
.unwrap()
@@ -344,7 +344,7 @@ pub fn get_running_tasks() -> Vec<RemoteUpid> {
/// returns their upids + status
///
/// panics on a poisoned mutex
-pub async fn get_finished_tasks() -> Vec<(RemoteUpid, String)> {
+async fn get_finished_tasks() -> Vec<(RemoteUpid, String)> {
let mut finished = Vec::new();
let config = match pdm_config::remotes::config() {
Ok((config, _)) => config,
@@ -396,7 +396,7 @@ pub async fn get_finished_tasks() -> Vec<(RemoteUpid, String)> {
}
/// Parses a task status string into a TaskStateType
-pub fn tasktype(status: &str) -> TaskStateType {
+fn tasktype(status: &str) -> TaskStateType {
if status == "unknown" || status.is_empty() {
TaskStateType::Unknown
} else if status == "OK" {
--
2.39.5
More information about the pdm-devel
mailing list