fix(drainer): ignore errors in case the stream is empty (#2261)

Co-authored-by: Arun Raj M <jarnura47@gmail.com>
This commit is contained in:
Kartikeya Hegde
2023-09-25 14:49:42 +05:30
committed by GitHub
parent e4af3812d5
commit 53de86f60d
5 changed files with 30 additions and 6 deletions

View File

@ -36,12 +36,11 @@ pub async fn read_from_stream(
// "0-0" id gives first entry
let stream_id = "0-0";
let (output, execution_time) = common_utils::date_time::time_it(|| async {
let entries = redis
redis
.stream_read_entries(stream_name, stream_id, Some(max_read_count))
.await
.map_err(DrainerError::from)
.into_report()?;
Ok(entries)
.into_report()
})
.await;