From 0d1127c974719bef62d06923f14e34aec3816f1b Mon Sep 17 00:00:00 2001 From: Damein Sedgwick Date: Thu, 14 Nov 2024 21:09:07 +0000 Subject: [PATCH] tmp removed env for ws url and added commit filter --- packages-rs/drainpipe/.env | 3 +-- packages-rs/drainpipe/src/main.rs | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages-rs/drainpipe/.env b/packages-rs/drainpipe/.env index 732cbd0..5df432c 100644 --- a/packages-rs/drainpipe/.env +++ b/packages-rs/drainpipe/.env @@ -1,2 +1 @@ -FRONTPAGE_CONSUMER_URL="http://localhost:3000/api/receive_hook" -JETSTREAM_URL="wss://jetstream1.us-east.bsky.network/subscribe" \ No newline at end of file +FRONTPAGE_CONSUMER_URL="http://localhost:3000/api/receive_hook" \ No newline at end of file diff --git a/packages-rs/drainpipe/src/main.rs b/packages-rs/drainpipe/src/main.rs index f7c4837..19f91d1 100644 --- a/packages-rs/drainpipe/src/main.rs +++ b/packages-rs/drainpipe/src/main.rs @@ -1,5 +1,4 @@ use futures_util::stream::StreamExt; -use std::env; use std::error::Error; use std::time::Duration; use tokio::time::timeout; @@ -7,8 +6,9 @@ use tokio_tungstenite::{connect_async, tungstenite::protocol::Message}; #[tokio::main] async fn main() -> Result<(), Box> { - let url = env::var("JETSTREAM_URL") - .unwrap_or("wss://jetstream1.us-west.bsky.network/subscribe".to_string()); + let url = + "wss://jetstream1.us-west.bsky.network/subscribe?wantedCollections=fyi.unravel.frontpage" + .to_string(); let mut reconnect_attempts = 0; let max_reconnect_attempts = 5;