File tree Expand file tree Collapse file tree
engine/sdks/rust/envoy-client/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,11 +3,18 @@ use rivet_envoy_protocol as protocol;
33use crate :: actor:: create_actor;
44use crate :: connection:: ws_send;
55use crate :: envoy:: EnvoyContext ;
6+ use crate :: stringify:: stringify_command_wrapper;
67
78pub const ACK_COMMANDS_INTERVAL_MS : u64 = 5 * 60 * 1000 ;
89
910pub async fn handle_commands ( ctx : & mut EnvoyContext , commands : Vec < protocol:: CommandWrapper > ) {
1011 tracing:: info!( command_count = commands. len( ) , "received commands" ) ;
12+ for command_wrapper in & commands {
13+ tracing:: info!(
14+ command = %stringify_command_wrapper( command_wrapper) ,
15+ "received command"
16+ ) ;
17+ }
1118
1219 for command_wrapper in commands {
1320 let checkpoint = command_wrapper. checkpoint ;
Original file line number Diff line number Diff line change @@ -2,8 +2,14 @@ use rivet_envoy_protocol as protocol;
22
33use crate :: connection:: ws_send;
44use crate :: envoy:: EnvoyContext ;
5+ use crate :: stringify:: stringify_event_wrapper;
56
67pub async fn handle_send_events ( ctx : & mut EnvoyContext , events : Vec < protocol:: EventWrapper > ) {
8+ tracing:: info!( event_count = events. len( ) , "sending events" ) ;
9+ for event in & events {
10+ tracing:: info!( event = %stringify_event_wrapper( event) , "sending event" ) ;
11+ }
12+
713 // Record in history per actor
814 for event in & events {
915 let mut remove_after_stop = false ;
@@ -60,6 +66,9 @@ pub async fn resend_unacknowledged_events(ctx: &EnvoyContext) {
6066 }
6167
6268 tracing:: info!( count = events. len( ) , "resending unacknowledged events" ) ;
69+ for event in & events {
70+ tracing:: info!( event = %stringify_event_wrapper( event) , "resending event" ) ;
71+ }
6372
6473 ws_send ( & ctx. shared , protocol:: ToRivet :: ToRivetEvents ( events) ) . await ;
6574}
You can’t perform that action at this time.
0 commit comments