Take ttl and backend from parameters
This commit is contained in:
@@ -31,6 +31,8 @@ pub enum SubCmd {
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
pub struct Bsread {
|
||||
#[arg(long)]
|
||||
pub backend: String,
|
||||
#[arg(long)]
|
||||
pub scylla: Vec<String>,
|
||||
#[arg(long)]
|
||||
@@ -50,6 +52,7 @@ pub struct Bsread {
|
||||
impl From<Bsread> for ZmtpClientOpts {
|
||||
fn from(k: Bsread) -> Self {
|
||||
Self {
|
||||
backend: k.backend,
|
||||
scylla: k.scylla,
|
||||
sources: k.source,
|
||||
rcvbuf: k.rcvbuf,
|
||||
@@ -67,6 +70,8 @@ pub struct FetchEvents {
|
||||
pub scylla: Vec<String>,
|
||||
#[arg(long)]
|
||||
pub channel: String,
|
||||
#[arg(long)]
|
||||
pub backend: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
|
||||
@@ -119,7 +119,7 @@ pub async fn fetch_events(opts: FetchEvents) -> Result<(), Error> {
|
||||
"select series, scalar_type, shape_dims from series_by_channel where facility = ? and channel_name = ?",
|
||||
)
|
||||
.await?;
|
||||
let qres = scy.execute(&qu_series, ("scylla", &opts.channel)).await?;
|
||||
let qres = scy.execute(&qu_series, (&opts.backend, &opts.channel)).await?;
|
||||
if let Some(rows) = qres.rows {
|
||||
info!("Found {} matching series", rows.len());
|
||||
for r in &rows {
|
||||
|
||||
Reference in New Issue
Block a user