Skip to content

Commit

Permalink
Fix compiling issue
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonOellerer committed Mar 21, 2023
1 parent 345ce8a commit a43941b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion springql-core/src/api/spring_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ pub struct SpringWebConsoleConfig {

/// Config related to source reader
#[allow(missing_docs)]
#[derive(Copy, Clone, Eq, PartialEq, Debug, Deserialize)]
#[derive(Clone, Eq, PartialEq, Debug, Deserialize)]
pub struct SpringSourceReaderConfig {
pub net_connect_timeout_msec: u32,
pub net_read_timeout_msec: u32,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl Repositories {
Self {
row_queue_repository: RowQueueRepository::default(),
window_queue_repository: WindowQueueRepository::default(),
source_reader_repository: SourceReaderRepository::new(config.source_reader),
source_reader_repository: SourceReaderRepository::new(config.source_reader.clone()),
sink_writer_repository: SinkWriterRepository::new(config.sink_writer),
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,13 @@ impl NetServerSourceReader {
}

fn stream_handler(stream: TcpStream, tx: mpsc::Sender<serde_json::Value>) {
// log::info!(
// "[NetServerSourceReader] Connection from {}",
// stream.peer_addr().unwrap()
// );
log::info!(
"[NetServerSourceReader] Connection from {}",
stream
.peer_addr()
.map(|peer_addr| peer_addr.to_string())
.unwrap_or("unknown".to_string())
);

let mut tcp_reader = BufReader::new(stream);

Expand Down Expand Up @@ -128,7 +131,6 @@ impl NetServerSourceReader {

#[cfg(test)]
mod tests {
use super::*;
use crate::{
api::SpringSinkWriterConfig,
pipeline::OptionsBuilder,
Expand All @@ -137,6 +139,9 @@ mod tests {
SchemalessRow,
},
};

use super::*;

fn ephemeral_port() -> u16 {
let addr = TcpListener::bind("127.0.0.1:0").unwrap();
addr.local_addr().unwrap().port()
Expand Down

0 comments on commit a43941b

Please sign in to comment.