From 29eb7501651b0779eef5ae25d2b111ed6ca4fc22 Mon Sep 17 00:00:00 2001 From: Raynor Date: Mon, 26 Dec 2022 17:25:37 +0000 Subject: [PATCH] Allow for variable stream delay to debug --- .env.production.sample | 5 ++++- scripts/start-firehose.sh | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.env.production.sample b/.env.production.sample index b915486..eca4c35 100644 --- a/.env.production.sample +++ b/.env.production.sample @@ -18,4 +18,7 @@ archive=false ## Put whatever amount of time here you want the container to restart after ## This will kill any hanging curl processes that may be taking up uncessary ## resources -restartTimeout=1h \ No newline at end of file +restartTimeout=1h + +## How long to delay starting a stream. Leave it here unless you are debugging +streamDelay="0.1s" \ No newline at end of file diff --git a/scripts/start-firehose.sh b/scripts/start-firehose.sh index 70bf335..695eb79 100644 --- a/scripts/start-firehose.sh +++ b/scripts/start-firehose.sh @@ -44,7 +44,7 @@ do echo "[INFO] Opening federated line $line" #Check for hashtags - if [[ "$line" == *" #"* ]]; then + if [[ "$line" == *" "* ]]; then echo "[INFO] $line has hashtags!" @@ -82,7 +82,7 @@ cat /config/hashtag-urls.txt >> /config/urls.txt cat /config/urls.txt | while read -r url do echo "[INFO] Opening $url to stream" - sleep 0.1s + sleep $streamDelay ./stream-url.sh $url & done