Moved err crate

This commit is contained in:
Dominik Werder
2024-11-07 18:26:02 +01:00
parent 8fd7e72796
commit 2f89c969cd
124 changed files with 191 additions and 738 deletions

View File

@@ -21,7 +21,7 @@ serde_json = "1.0"
chrono = "0.4"
url = "2.2.2"
lazy_static = "1.4.0"
err = { path = "../err" }
daqbuf-err = { path = "../../../daqbuf-err" }
taskrun = { path = "../taskrun" }
netpod = { path = "../netpod" }
query = { path = "../query" }

View File

@@ -1,8 +1,8 @@
use crate::err::ErrConv;
use chrono::DateTime;
use chrono::Utc;
use daqbuf_err::Error;
use disk::streamlog::Streamlog;
use err::Error;
use futures_util::TryStreamExt;
use http::StatusCode;
use http::Uri;
@@ -118,7 +118,7 @@ pub async fn get_binned(
StreamItem::DataItem(_frame) => {
// TODO
// The expected type nowadays depends on the channel and agg-kind.
err::todo();
daqbuf_err::todo();
Some(Ok(()))
}
},

View File

@@ -4,7 +4,7 @@ pub mod nodes;
#[cfg(test)]
pub mod test;
use ::err::Error;
use daqbuf_err::Error;
use futures_util::TryFutureExt;
use netpod::Cluster;
use netpod::NodeConfig;

View File

@@ -1,14 +1,14 @@
pub trait ErrConv<T> {
fn ec(self) -> Result<T, ::err::Error>;
fn ec(self) -> Result<T, daqbuf_err::Error>;
}
pub trait Convable: ToString {}
impl<T, E: Convable> ErrConv<T> for Result<T, E> {
fn ec(self) -> Result<T, ::err::Error> {
fn ec(self) -> Result<T, daqbuf_err::Error> {
match self {
Ok(x) => Ok(x),
Err(e) => Err(::err::Error::from_string(e.to_string())),
Err(e) => Err(daqbuf_err::Error::from_string(e.to_string())),
}
}
}

View File

@@ -1,5 +1,5 @@
use crate::spawn_test_hosts;
use err::Error;
use daqbuf_err::Error;
use netpod::log::*;
use netpod::Cluster;
use std::sync::{Arc, Mutex};

View File

@@ -1,7 +1,7 @@
mod data_api_python;
use crate::nodes::require_test_hosts_running;
use err::Error;
use daqbuf_err::Error;
use futures_util::Future;
use httpclient::http_post;
use netpod::log::*;

View File

@@ -1,6 +1,6 @@
use crate::nodes::require_test_hosts_running;
use chrono::Utc;
use err::Error;
use daqbuf_err::Error;
use netpod::log::*;
use netpod::range::evrange::NanoRange;
use netpod::timeunits::MS;

View File

@@ -1,6 +1,6 @@
use crate::nodes::require_test_hosts_running;
use chrono::Utc;
use err::Error;
use daqbuf_err::Error;
use items_0::test::f32_iter_cmp_near;
use items_0::test::f64_iter_cmp_near;
use items_0::WithLen;

View File

@@ -1,5 +1,5 @@
use chrono::Utc;
use err::Error;
use daqbuf_err::Error;
use netpod::log::*;
use netpod::AppendToUrl;
use netpod::Cluster;

View File

@@ -1,7 +1,7 @@
use crate::nodes::require_test_hosts_running;
use crate::test::api4::common::fetch_events_json;
use chrono::Utc;
use err::Error;
use daqbuf_err::Error;
use items_0::WithLen;
use items_2::eventsdim0::EventsDim0CollectorOutput;
use netpod::log::*;

View File

@@ -1,6 +1,6 @@
use crate::nodes::require_test_hosts_running;
use crate::test::api4::common::fetch_events_json;
use err::Error;
use daqbuf_err::Error;
use items_0::test::f32_iter_cmp_near;
use items_0::WithLen;
use items_2::eventsdim0::EventsDim0CollectorOutput;

View File

@@ -1,6 +1,6 @@
#![allow(unused)]
use crate::nodes::require_archapp_test_host_running;
use err::Error;
use daqbuf_err::Error;
use netpod::f64_close;
use netpod::log::*;

View File

@@ -1,6 +1,6 @@
mod channelarchiver;
use err::Error;
use daqbuf_err::Error;
#[test]
fn get_sls_archive_1() -> Result<(), Error> {

View File

@@ -1,6 +1,6 @@
use chrono::DateTime;
use chrono::Utc;
use err::Error;
use daqbuf_err::Error;
use netpod::log::*;
use netpod::query::CacheUsage;
use netpod::range::evrange::NanoRange;