mirror of
https://github.com/BigBodyCobain/Shadowbroker.git
synced 2026-06-03 21:08:13 +02:00
fix: stop AIS proxy crash-loop when API key is not set
Exit early from _ais_stream_loop() if AIS_API_KEY is empty instead of endlessly spawning the Node proxy which immediately prints FATAL and exits. This was flooding docker logs with hundreds of lines per minute.
This commit is contained in:
@@ -487,6 +487,10 @@ def _ais_stream_loop():
|
||||
proxy_script = os.path.join(os.path.dirname(os.path.dirname(__file__)), "ais_proxy.js")
|
||||
backoff = 1 # Exponential backoff starting at 1 second
|
||||
|
||||
if not API_KEY:
|
||||
logger.info("AIS_API_KEY not set — ship tracking disabled. Set AIS_API_KEY to enable.")
|
||||
return
|
||||
|
||||
while _ws_running:
|
||||
try:
|
||||
logger.info("Starting Node.js AIS Stream Proxy...")
|
||||
|
||||
Reference in New Issue
Block a user