mirror of https://github.com/mastodon/flodgatt
Remove debug statements (#43)
This commit is contained in:
parent
ecfdda093c
commit
989c71059e
|
@ -4,7 +4,7 @@ use flodgatt::{
|
||||||
redis_to_client_stream,
|
redis_to_client_stream,
|
||||||
redis_to_client_stream::ClientAgent,
|
redis_to_client_stream::ClientAgent,
|
||||||
};
|
};
|
||||||
use log::{log_enabled, Level};
|
use log::warn;
|
||||||
use warp::{ws::Ws2, Filter as WarpFilter};
|
use warp::{ws::Ws2, Filter as WarpFilter};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
@ -12,9 +12,7 @@ fn main() {
|
||||||
let client_agent_sse = ClientAgent::blank();
|
let client_agent_sse = ClientAgent::blank();
|
||||||
let client_agent_ws = client_agent_sse.clone_with_shared_receiver();
|
let client_agent_ws = client_agent_sse.clone_with_shared_receiver();
|
||||||
|
|
||||||
if log_enabled!(Level::Warn) {
|
warn!("Streaming server initialized and ready to accept connections");
|
||||||
println!("Streaming server initialized and ready to accept connections");
|
|
||||||
};
|
|
||||||
|
|
||||||
// Server Sent Events
|
// Server Sent Events
|
||||||
let sse_routes = sse::extract_user_or_reject()
|
let sse_routes = sse::extract_user_or_reject()
|
||||||
|
|
|
@ -123,11 +123,10 @@ mod test {
|
||||||
fn $name() {
|
fn $name() {
|
||||||
let path = format!("{}?access_token=INVALID", $path);
|
let path = format!("{}?access_token=INVALID", $path);
|
||||||
$(let path = format!("{}&{}", path, $query);)*
|
$(let path = format!("{}&{}", path, $query);)*
|
||||||
dbg!(&path);
|
warp::test::request()
|
||||||
warp::test::request()
|
.path(&path)
|
||||||
.path(&path)
|
.filter(&extract_user_or_reject())
|
||||||
.filter(&extract_user_or_reject())
|
.expect("in test");
|
||||||
.expect("in test");
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -141,8 +140,7 @@ mod test {
|
||||||
fn $name() {
|
fn $name() {
|
||||||
let path = $path;
|
let path = $path;
|
||||||
$(let path = format!("{}?{}", path, $query);)*
|
$(let path = format!("{}?{}", path, $query);)*
|
||||||
dbg!(&path);
|
warp::test::request()
|
||||||
warp::test::request()
|
|
||||||
.path(&path)
|
.path(&path)
|
||||||
.header("Authorization", "Bearer: INVALID")
|
.header("Authorization", "Bearer: INVALID")
|
||||||
.filter(&extract_user_or_reject())
|
.filter(&extract_user_or_reject())
|
||||||
|
|
|
@ -63,7 +63,6 @@ pub fn send_updates_to_ws(
|
||||||
.for_each(move |_json_value| {
|
.for_each(move |_json_value| {
|
||||||
if let Ok(Async::Ready(Some(json_value))) = stream.poll() {
|
if let Ok(Async::Ready(Some(json_value))) = stream.poll() {
|
||||||
let msg = warp::ws::Message::text(json_value.to_string());
|
let msg = warp::ws::Message::text(json_value.to_string());
|
||||||
// dbg!(&msg);
|
|
||||||
tx.unbounded_send(msg).expect("No send error");
|
tx.unbounded_send(msg).expect("No send error");
|
||||||
};
|
};
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in New Issue