-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new_timestamp() to session, Add timestamp to Delete, and Put Opti…
…ons, Tracking created timestamps on backend
- Loading branch information
1 parent
2357228
commit d2bc32d
Showing
13 changed files
with
162 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use std::{error::Error, net::SocketAddr, str::FromStr}; | ||
use std::{error::Error, net::SocketAddr}; | ||
|
||
use tracing::{error, warn}; | ||
use zenoh::query::Query; | ||
|
@@ -91,12 +91,8 @@ pub async fn handle_data_message( | |
None => {} | ||
} | ||
|
||
match timestamp.map(|x| uhlc::Timestamp::from_str(&x)) { | ||
Some(Err(e)) => error!("{:?}", e), | ||
Some(Ok(timestamp)) => { | ||
publisher_builder = publisher_builder.timestamp(timestamp); | ||
} | ||
None => {} // let uhlc_ts = uhlc::Timestamp::from_str(&ts); | ||
if let Some(ts) = timestamp.and_then(|k| state_map.timestamps.get(&k)) { | ||
publisher_builder = publisher_builder.timestamp(*ts); | ||
} | ||
|
||
if let Err(e) = publisher_builder.await { | ||
|
@@ -149,7 +145,11 @@ pub async fn handle_data_message( | |
}, | ||
DataMsg::Sample(_, _) | ||
| DataMsg::GetReply(_) | ||
| DataMsg::NewTimestamp(_) | ||
| DataMsg::NewTimestamp { | ||
id: _, | ||
string_rep: _, | ||
millis_since_epoch: _, | ||
} | ||
| DataMsg::SessionInfo(_) => { | ||
error!("Server Should not recieved a {data_msg:?} Variant from client"); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.