fix: spawnid typo
This commit is contained in:
+6
-13
@@ -6,10 +6,11 @@ use futures_util::StreamExt;
|
||||
use parking_lot::Mutex;
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
fmt,
|
||||
sync::{
|
||||
atomic::{AtomicBool, Ordering},
|
||||
Arc,
|
||||
}, fmt,
|
||||
},
|
||||
};
|
||||
use tokio::{sync::mpsc::Receiver, task::JoinHandle};
|
||||
|
||||
@@ -25,14 +26,14 @@ pub use message::DockerMessage;
|
||||
#[derive(Debug, Hash, Clone, PartialEq, Eq)]
|
||||
enum SpawnId {
|
||||
Stats(String),
|
||||
Log(String)
|
||||
Log(String),
|
||||
}
|
||||
|
||||
impl fmt::Display for SpawnId {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let disp = match self {
|
||||
Self::Stats(id) => format!("stats::{id}"),
|
||||
Self::Log(id) => format!("logs::{id}")
|
||||
Self::Log(id) => format!("logs::{id}"),
|
||||
};
|
||||
write!(f, "{}", disp)
|
||||
}
|
||||
@@ -247,10 +248,7 @@ let s = tokio::spawn(Self::update_log(
|
||||
docker, id, timestamps, 0, app_data, spawns,
|
||||
));
|
||||
|
||||
self.spawns.lock().insert(
|
||||
key,
|
||||
s
|
||||
);
|
||||
self.spawns.lock().insert(key, s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -271,12 +269,7 @@ let s = tokio::spawn(Self::update_log(
|
||||
let app_data = Arc::clone(&self.app_data);
|
||||
let spawns = Arc::clone(&self.spawns);
|
||||
let s = tokio::spawn(Self::update_log(
|
||||
docker,
|
||||
id,
|
||||
timestamps,
|
||||
since,
|
||||
app_data,
|
||||
spawns,
|
||||
docker, id, timestamps, since, app_data, spawns,
|
||||
));
|
||||
self.spawns.lock().insert(key, s);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user