Skip to content

Commit

Permalink
⚗️ (ServerBuilder): Add fuck_off_on_observer_push
Browse files Browse the repository at this point in the history
  • Loading branch information
czy-29 committed Dec 15, 2024
1 parent b5f5727 commit c7c2a19
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tracing-surreal/src/tmp/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ pub struct ServerBuilder<C: Connection> {
accept_bincode: bool,
accept_msgpack: bool,
fuck_off_on_damage: bool,
fuck_off_on_observer_push: bool,
ctrlc_shutdown: bool,
ws_handshake_timeout: Duration,
tmp_handshake_timeout: Duration,
Expand Down Expand Up @@ -167,6 +168,13 @@ impl<C: Connection + Clone> ServerBuilder<C> {
}
}

pub fn fuck_off_on_observer_push(self) -> Self {
Self {
fuck_off_on_observer_push: true,
..self
}
}

pub fn disable_ctrlc_shutdown(self) -> Self {
Self {
ctrlc_shutdown: false,
Expand Down Expand Up @@ -208,6 +216,7 @@ impl<C: Connection + Clone> ServerBuilder<C> {
let routine = tokio::spawn(async move {
builder.stop.print().await;
println!("{}", builder.fuck_off_on_damage);
println!("{}", builder.fuck_off_on_observer_push);
println!("{:?}", builder.tmp_handshake_timeout);
// log safe builder info + local_addr into db

Expand Down Expand Up @@ -347,6 +356,7 @@ impl<C: Connection + Clone> BuildServerDefault<C> for Stop<C> {
accept_bincode: true,
accept_msgpack: true,
fuck_off_on_damage: false,
fuck_off_on_observer_push: false,
ctrlc_shutdown: true,
ws_handshake_timeout: Duration::from_secs_f64(1.5),
tmp_handshake_timeout: Duration::from_secs_f64(3.0),
Expand Down

0 comments on commit c7c2a19

Please sign in to comment.