Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ edition = "2021"
[workspace.dependencies]
anyhow = "1.0"
assert_approx_eq = "1.1.0"
async-trait = "0.1.83"
chrono = { version = "0.4.39", features = ["serde"] }
clap = { version = "4.5", features = ["derive", "env"] }
crossterm = "0.26.1"
Expand Down
1 change: 0 additions & 1 deletion trace-archiver-tdengine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ edition.workspace = true

[dependencies]
anyhow.workspace = true
async-trait.workspace = true
chrono.workspace = true
clap.workspace = true
itertools.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions trace-archiver-tdengine/src/tdengine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ pub mod framedata;
mod views;
pub mod wrapper;

use async_trait::async_trait;
use error::{StatementErrorCode, TDEngineError, TraceMessageErrorCode};
use supermusr_streaming_types::dat2_digitizer_analog_trace_v2_generated::DigitizerAnalogTraceMessage;

#[async_trait]
pub(crate) trait TimeSeriesEngine {
async fn process_message(&mut self, msg: &DigitizerAnalogTraceMessage) -> anyhow::Result<()>;
async fn post_message(&mut self) -> anyhow::Result<usize>;
Expand Down
4 changes: 1 addition & 3 deletions trace-archiver-tdengine/src/tdengine/wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use super::{
views::{create_column_views, create_frame_column_views},
StatementErrorCode, TDEngineError, TimeSeriesEngine, TraceMessageErrorCode,
};
use async_trait::async_trait;
use supermusr_streaming_types::dat2_digitizer_analog_trace_v2_generated::DigitizerAnalogTraceMessage;
use taos::{AsyncBindable, AsyncQueryable, AsyncTBuilder, Stmt, Taos, TaosBuilder, Value};
use tracing::debug;
Expand Down Expand Up @@ -130,7 +129,6 @@ impl TDEngine {
}
}

#[async_trait]
impl TimeSeriesEngine for TDEngine {
/// Takes a reference to a ``DigitizerAnalogTraceMessage`` instance and extracts the relevant data from it.
/// The user should then call ``post_message`` to send the data to the tdengine server.
Expand All @@ -141,7 +139,7 @@ impl TimeSeriesEngine for TDEngine {
/// An emtpy result or an error arrising a malformed ``DigitizerAnalogTraceMessage`` parameter.
async fn process_message(
&mut self,
message: &DigitizerAnalogTraceMessage,
message: &DigitizerAnalogTraceMessage<'_>,
) -> anyhow::Result<()> {
// Obtain the channel data, and error check
self.error.test_metadata(message);
Expand Down
Loading