-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
With this filter, the debug line outputs the same dir and repeat for ever. I assumed that even my filter is broken, it should loop on the same node.
The version is v2.1.0.
while let Some(x) = WalkDir::new("/sys/fs/cgroup/kubepods")
.filter(|x| async move {
if x.file_type().await.is_ok_and(|x| x.is_dir()) {
if x.path()
.parent()
.and_then(|x| x.to_str())
.unwrap_or_default()
.starts_with("pod")
{
Filtering::IgnoreDir
} else {
Filtering::Continue
}
} else {
Filtering::Ignore
}
})
.next()
.await
{
let cgroup_folder = x?;
debug!("{cgroup_folder:?}");
/// Other codes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels