fix: Extract memory_guard() to lib/env.sh to deduplicate poll scripts
The memory guard block in action-poll.sh and dev-poll.sh became identical after removing matrix_send calls, triggering the duplicate-detection CI check. Extract to a shared function in lib/env.sh (already sourced by both scripts). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
472d70e4bb
commit
d8dab4a18a
3 changed files with 14 additions and 10 deletions
|
|
@ -309,11 +309,7 @@ if [ -f "$LOCKFILE" ]; then
|
|||
fi
|
||||
|
||||
# --- Memory guard ---
|
||||
AVAIL_MB=$(awk '/MemAvailable/{printf "%d", $2/1024}' /proc/meminfo)
|
||||
if [ "$AVAIL_MB" -lt 2000 ]; then
|
||||
log "SKIP: only ${AVAIL_MB}MB available (need 2000MB)"
|
||||
exit 0
|
||||
fi
|
||||
memory_guard 2000
|
||||
|
||||
# =============================================================================
|
||||
# HELPER: check if a dependency issue is fully resolved (closed + PR merged)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue