Delete of old event data

This commit is contained in:
Dominik Werder
2024-07-09 14:30:43 +02:00
parent 54008718eb
commit 2c856f5c1f
33 changed files with 278 additions and 13 deletions
+1
View File
@@ -17,6 +17,7 @@ use std::time::SystemTime;
use taskrun::tokio::net::UdpSocket;
#[derive(Debug, ThisError)]
#[cstm(name = "NetfetchBeacons")]
pub enum Error {
Io(#[from] std::io::Error),
SeriesWriter(#[from] serieswriter::writer::Error),
+13 -5
View File
@@ -143,6 +143,7 @@ fn dbg_chn_cid(cid: Cid, conn: &CaConn) -> bool {
}
#[derive(Debug, ThisError)]
#[cstm(name = "NetfetchConn")]
pub enum Error {
NoProtocol,
ProtocolError,
@@ -264,6 +265,12 @@ mod ser_instant {
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
struct Cid(pub u32);
impl fmt::Display for Cid {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
write!(fmt, "Cid({})", self.0)
}
}
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
struct Subid(pub u32);
@@ -1819,16 +1826,17 @@ impl CaConn {
CaDataScalarValue::I32(x) => ScalarValue::I32(x),
CaDataScalarValue::F32(x) => ScalarValue::F32(x),
CaDataScalarValue::F64(x) => ScalarValue::F64(x),
CaDataScalarValue::Enum(x) => ScalarValue::Enum(
x,
crst.enum_str_table.as_ref().map_or_else(
CaDataScalarValue::Enum(x) => ScalarValue::Enum(x, {
let conv = crst.enum_str_table.as_ref().map_or_else(
|| String::from("missingstrings"),
|map| {
map.get(x as usize)
.map_or_else(|| String::from("undefined"), String::from)
},
),
),
);
info!("convert_event_data {} {:?}", crst.name(), conv);
conv
}),
CaDataScalarValue::String(x) => ScalarValue::String(x),
CaDataScalarValue::Bool(x) => ScalarValue::Bool(x),
}
+1
View File
@@ -11,6 +11,7 @@ use std::pin::Pin;
use std::time::Instant;
#[derive(Debug, ThisError)]
#[cstm(name = "NetfetchEnumfetch")]
pub enum Error {
MissingState,
}
+1
View File
@@ -20,6 +20,7 @@ use tokio::io::AsyncWrite;
use tokio::io::ReadBuf;
#[derive(Debug, ThisError)]
#[cstm(name = "NetfetchCaProto")]
pub enum Error {
NetBuf(#[from] netbuf::Error),
SlideBuf(#[from] slidebuf::Error),
+1
View File
@@ -46,6 +46,7 @@ macro_rules! debug_cql {
}
#[derive(Debug, ThisError)]
#[cstm(name = "HttpDelete")]
pub enum Error {
Logic,
MissingRetentionTime,
+1
View File
@@ -64,6 +64,7 @@ macro_rules! trace_queues {
}
#[derive(Debug, ThisError)]
#[cstm(name = "MetricsIngest")]
pub enum Error {
UnsupportedContentType,
Logic,
+1
View File
@@ -19,6 +19,7 @@ use std::time::Instant;
use std::time::SystemTime;
#[derive(Debug, ThisError)]
#[cstm(name = "HttpPostingest")]
pub enum Error {
Msg,
SeriesWriter(#[from] serieswriter::writer::Error),