Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .github/workflows/translate-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,21 @@ jobs:
fi
}

sleep_with_heartbeat() {
remaining="$1"
while [ "${remaining}" -gt 0 ]; do
chunk="${remaining}"
if [ "${chunk}" -gt 60 ]; then
chunk="60"
fi
sleep "${chunk}"
remaining=$((remaining - chunk))
if [ "${remaining}" -gt 0 ]; then
echo "Still debouncing docs main; ${remaining}s remaining."
fi
done
}

elapsed=0
while :; do
read_main_state
Expand All @@ -124,7 +139,7 @@ jobs:
fi

echo "Waiting ${cooldown}s for docs main to settle at ${before_ref} (${before_source})."
sleep "${cooldown}"
sleep_with_heartbeat "${cooldown}"
elapsed=$((elapsed + cooldown))

read_main_state
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/translate-incremental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,21 @@ jobs:
fi
}

sleep_with_heartbeat() {
remaining="$1"
while [ "${remaining}" -gt 0 ]; do
chunk="${remaining}"
if [ "${chunk}" -gt 60 ]; then
chunk="60"
fi
sleep "${chunk}"
remaining=$((remaining - chunk))
if [ "${remaining}" -gt 0 ]; then
echo "Still debouncing docs main; ${remaining}s remaining."
fi
done
}

elapsed=0
while :; do
read_main_state
Expand All @@ -121,7 +136,7 @@ jobs:
fi

echo "Waiting ${cooldown}s for docs main to settle at ${before_ref} (${before_source})."
sleep "${cooldown}"
sleep_with_heartbeat "${cooldown}"
elapsed=$((elapsed + cooldown))

read_main_state
Expand Down