This commit is contained in:
Bastian Gruber 2023-05-22 10:13:04 +02:00
parent 34c6343d63
commit f62a6e804a
No known key found for this signature in database
GPG key ID: BE9F8C772B188CBF

View file

@ -5,7 +5,7 @@ use tokio::{
sync::{broadcast, mpsc, Semaphore}, sync::{broadcast, mpsc, Semaphore},
time::{self, Duration}, time::{self, Duration},
}; };
use tracing::error; use tracing::{error, info};
use crate::{ use crate::{
connection::ConnectionType, connection::ConnectionType,
@ -179,6 +179,7 @@ impl Handler {
) -> crate::Result<()> { ) -> crate::Result<()> {
match frame { match frame {
ClientFrames::Plate { plate, timestamp } => { ClientFrames::Plate { plate, timestamp } => {
info!("Receive new plate: {plate} at {timestamp}");
issue_possible_ticket( issue_possible_ticket(
&mut db, &mut db,
Plate { Plate {
@ -198,6 +199,7 @@ impl Handler {
} }
} }
ClientFrames::IAmCamera { road, mile, limit } => { ClientFrames::IAmCamera { road, mile, limit } => {
info!("Receive new camera: {road} at {mile} with limit {limit}");
if self.connection_type.is_some() { if self.connection_type.is_some() {
return Err("Already connected".into()); return Err("Already connected".into());
} }