gateway: single TTS warm path — drop the 10-min scheduler task, in-container loop every 15 min
The scheduler task ran audio_keepalive.py in its own container every 10 min in parallel with the in-container loop (8 min): two warm paths billing the same ping twice, and the scheduler container's access to 127.0.0.1:4000 and /app/data was never proven. Keep the proven in-container path only, at a 15-minute interval (sleep 900).
This commit is contained in:
1 parent
c43d45c455
commit
64d7e5afc5
4 files changed
+19
-22
No files matched your search
@@ -239,20 +239,21 @@ if [ "$proxy_up" != "1" ]; then
|
||||
fi
|
||||
echo "Tinfoil proxy is up on 127.0.0.1:3301"
|
||||
|
||||
# --- In-container audio keep-alive loop ---
|
||||
# The scheduler task (handled above in scheduler-task mode) runs in a SEPARATE
|
||||
# container whose ability to reach 127.0.0.1:4000 and read /app/data is not
|
||||
# guaranteed, so the warm path is owned HERE — the app container, where the
|
||||
# network namespace, the master key and the sidecar are all proven. Every 8
|
||||
# minutes ping tinfoil/voxtral-tts ($0.002/request) so voice mode skips the
|
||||
# ~24s Tinfoil cold-start after idle. audio_keepalive.py is silent on success
|
||||
# and prints on failure, so /app/data/keepalive.log only ever grows on failure.
|
||||
# --- In-container audio keep-alive loop (the ONLY warm path) ---
|
||||
# A separate scheduler-task container was removed 2026-11-09: its container
|
||||
# could not be proven to reach 127.0.0.1:4000 and /app/data, and two warm
|
||||
# paths billed twice for the same ping. The warm path is owned HERE — the
|
||||
# app container, where the network namespace, the master key and the
|
||||
# sidecar are all proven. Every 15 minutes ping tinfoil/voxtral-tts
|
||||
# ($0.002/request) so voice mode skips the ~24s Tinfoil cold-start after
|
||||
# idle. audio_keepalive.py is silent on success and prints on failure, so
|
||||
# /app/data/keepalive.log only ever grows on failure.
|
||||
(
|
||||
while true; do
|
||||
python3 /app/code/audio_keepalive.py >> /app/data/keepalive.log 2>&1 || true
|
||||
sleep 480
|
||||
sleep 900
|
||||
done
|
||||
) &
|
||||
echo "Audio keep-alive loop started (every 480s)"
|
||||
echo "Audio keep-alive loop started (every 900s)"
|
||||
|
||||
exec litellm --config "$CONFIG_FILE" --port 4000 --host 0.0.0.0
|
||||
Reference in new issue
Block a user