diff --git a/src/net/offline_fluereflows.rs b/src/net/offline_fluereflows.rs index 160403a..2423f2e 100644 --- a/src/net/offline_fluereflows.rs +++ b/src/net/offline_fluereflows.rs @@ -1,4 +1,9 @@ -use std::{collections::{HashMap, BTreeMap}, fs, path::Path, time::Instant}; +use std::{ + collections::{BTreeMap, HashMap}, + fs, + path::Path, + time::Instant, +}; use crate::{ net::{ @@ -169,7 +174,7 @@ pub async fn fluereflow_fileparse(arg: Args) -> Result<(), FluereError> { for (_key, flow) in active_flow.clone().iter() { records.push(*flow); } - + let tasks = task::spawn(async { fluere_exporter(records, file).await; }); @@ -180,4 +185,4 @@ pub async fn fluereflow_fileparse(arg: Args) -> Result<(), FluereError> { info!("Active flows: {:?}", ac_flow_cnt); info!("Ended flows: {:?}", ended_flow_cnt); Ok(()) -} \ No newline at end of file +} diff --git a/src/net/online_fluereflow.rs b/src/net/online_fluereflow.rs index 8a0bbc0..82228e5 100644 --- a/src/net/online_fluereflow.rs +++ b/src/net/online_fluereflow.rs @@ -3,7 +3,7 @@ // The data is then exported to a CSV file. use std::{ - collections::{HashMap, BTreeMap}, + collections::{BTreeMap, HashMap}, fs, mem::take, time::{Duration, Instant}, @@ -269,4 +269,4 @@ pub async fn packet_capture(arg: Args) -> Result<(), FluereError> { // info!("Exporting task excutation result: {:?}", result); Ok(()) -} \ No newline at end of file +}