More optimizations

This commit is contained in:
2026-02-27 20:54:51 -06:00
parent 36f78fb8b1
commit 46afcbb3a6

View File

@@ -19,10 +19,7 @@ log() {
PAYLOAD=$(cat "$EVENT_FILE")
# 4. Check Connection quickly (1 second max)
if ! nc -z -w 1 "$RCLONE_ENDPOINT" "$RCLONE_PORT"; then
log "ERROR" "Remote repo offline. Skipping sync to avoid hang."
exit 1
fi
nc -z -w 1 "$RCLONE_ENDPOINT" "$RCLONE_PORT" || { log "ERROR" "Offline"; exit 1; }
# 5. Publish Request
if mosquitto_pub -h 127.0.0.1 -p 1883 -t "$TOPIC" -m "$PAYLOAD"; then