tangled
alpha
login
or
join now
angrydutchman.peedee.es
/
plcbundle-rs
forked from
atscan.net/plcbundle-rs
0
fork
atom
High-performance implementation of plcbundle written in Rust
0
fork
atom
overview
issues
pulls
pipelines
refactor(shutdown): simplify shutdown condition checks
tree.fail
4 months ago
564e9f8e
9db855ec
+5
-9
3 changed files
expand all
collapse all
unified
split
src
manager.rs
plc_client.rs
sync.rs
+2
-4
src/manager.rs
···
1873
1873
}
1874
1874
1875
1875
let fetch_op_start = Instant::now();
1876
1876
-
if let Some(ref rx) = shutdown_rx {
1877
1877
-
if *rx.borrow() {
1878
1878
-
anyhow::bail!("Shutdown requested");
1879
1879
-
}
1876
1876
+
if let Some(ref rx) = shutdown_rx && *rx.borrow() {
1877
1877
+
anyhow::bail!("Shutdown requested");
1880
1878
}
1881
1879
let (plc_ops, wait_dur, http_dur) = if let Some(rx) = shutdown_rx.clone() {
1882
1880
client
+2
-4
src/plc_client.rs
···
98
98
let mut total_http = Duration::from_secs(0);
99
99
100
100
for attempt in 1..=max_retries {
101
101
-
if let Some(ref rx) = shutdown_rx {
102
102
-
if *rx.borrow() {
103
103
-
anyhow::bail!("Shutdown requested");
104
104
-
}
101
101
+
if let Some(ref rx) = shutdown_rx && *rx.borrow() {
102
102
+
anyhow::bail!("Shutdown requested");
105
103
}
106
104
let export_url = format!(
107
105
"{}/export?after={}&count={}",
+1
-1
src/sync.rs
···
270
270
bundle_num: u32,
271
271
hash: &str,
272
272
age: &str,
273
273
-
fetch_duration_ms: u64,
273
273
+
_fetch_duration_ms: u64,
274
274
bundle_save_ms: u64,
275
275
index_ms: u64,
276
276
_total_duration_ms: u64,