Switch to dyn events process
This commit is contained in:
@@ -18,9 +18,7 @@ pub async fn plain_events_json(
|
||||
// TODO remove magic constant
|
||||
let deadline = Instant::now() + query.timeout() + Duration::from_millis(1000);
|
||||
let events_max = query.events_max();
|
||||
let _empty = items::empty_events_dyn(&chconf.scalar_type, &chconf.shape, query.agg_kind());
|
||||
let _empty = items_2::empty_events_dyn(&chconf.scalar_type, &chconf.shape, query.agg_kind());
|
||||
let empty = items_2::empty_events_dyn_2(&chconf.scalar_type, &chconf.shape, query.agg_kind());
|
||||
let empty = items_2::empty_events_dyn_ev(&chconf.scalar_type, &chconf.shape, query.agg_kind())?;
|
||||
let empty = ChannelEvents::Events(empty);
|
||||
let empty = items::sitem_data(empty);
|
||||
// TODO should be able to ask for data-events only, instead of mixed data and status events.
|
||||
|
||||
@@ -20,9 +20,7 @@ pub async fn timebinned_json(query: &BinnedQuery, chconf: &ChConf, cluster: &Clu
|
||||
let do_time_weight = query.agg_kind().do_time_weighted();
|
||||
let timeout = Duration::from_millis(7500);
|
||||
let deadline = Instant::now() + timeout;
|
||||
let _empty = items::empty_events_dyn(&chconf.scalar_type, &chconf.shape, query.agg_kind());
|
||||
let _empty = items_2::empty_events_dyn(&chconf.scalar_type, &chconf.shape, query.agg_kind());
|
||||
let empty = items_2::empty_events_dyn_2(&chconf.scalar_type, &chconf.shape, query.agg_kind());
|
||||
let empty = items_2::empty_events_dyn_ev(&chconf.scalar_type, &chconf.shape, query.agg_kind())?;
|
||||
let empty = ChannelEvents::Events(empty);
|
||||
let empty = items::sitem_data(empty);
|
||||
let rawquery = PlainEventsQuery::new(
|
||||
@@ -35,7 +33,7 @@ pub async fn timebinned_json(query: &BinnedQuery, chconf: &ChConf, cluster: &Clu
|
||||
);
|
||||
let inps = open_tcp_streams::<_, items_2::channelevents::ChannelEvents>(&rawquery, cluster).await?;
|
||||
// TODO propagate also the max-buf-len for the first stage event reader:
|
||||
netpod::log::info!("timebinned_json with empty item {empty:?}");
|
||||
info!("timebinned_json with empty item {empty:?}");
|
||||
let stream = items_2::merger::Merger::new(inps, 128);
|
||||
let stream = stream::iter([empty]).chain(stream);
|
||||
let stream = Box::pin(stream);
|
||||
|
||||
Reference in New Issue
Block a user