0.5.0-alpha.0

This commit is contained in:
Dominik Werder
2023-12-11 15:55:18 +01:00
parent 3d110f1ea6
commit 11d35e0cb6
8 changed files with 72 additions and 64 deletions

View File

@@ -62,6 +62,13 @@ impl UpdateDbWithChannelNamesHandler {
}
Err(e) => Err(e),
});
let stream = streams::print_on_done::PrintOnDone::new(
stream,
Box::pin(|ts| {
let dt = ts.elapsed();
info!("{} stream done {:.0} ms", Self::self_name(), 1e3 * dt.as_secs_f32());
}),
);
let ret = response(StatusCode::OK)
.header(http::header::CONTENT_TYPE, APP_JSON_LINES)
.body(body_stream(stream))?;
@@ -122,6 +129,13 @@ impl UpdateDbWithAllChannelConfigsHandler {
}
Err(e) => Err(e),
});
let stream = streams::print_on_done::PrintOnDone::new(
stream,
Box::pin(|ts| {
let dt = ts.elapsed();
info!("{} stream done {:.0} ms", Self::self_name(), 1e3 * dt.as_secs_f32());
}),
);
let ret = response(StatusCode::OK)
.header(http::header::CONTENT_TYPE, APP_JSON_LINES)
.body(body_stream(stream))?;