mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-19 16:39:50 +00:00
refactor: quote sleep delay variables for safety
Quote INSTANCE_STATUS_POLL_DELAY, SSH_RETRY_DELAY, and SPRITE_CONNECTIVITY_POLL_DELAY to prevent potential word splitting issues with unusual values. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
9137a3d1fe
commit
6244720c84
2 changed files with 3 additions and 3 deletions
|
|
@ -166,7 +166,7 @@ print(d.get('error', {}).get('message', d.get('error', 'Unknown error')))
|
|||
return 0
|
||||
fi
|
||||
log_warn "Instance status: ${status} (${attempt}/${max_attempts})"
|
||||
sleep ${INSTANCE_STATUS_POLL_DELAY}; attempt=$((attempt + 1))
|
||||
sleep "${INSTANCE_STATUS_POLL_DELAY}"; attempt=$((attempt + 1))
|
||||
done
|
||||
log_error "Instance did not become active in time"; return 1
|
||||
}
|
||||
|
|
@ -180,7 +180,7 @@ verify_server_connectivity() {
|
|||
if ssh ${SSH_OPTS} -o ConnectTimeout=5 "ubuntu@${ip}" "echo ok" >/dev/null 2>&1; then
|
||||
log_info "SSH connection established"; return 0
|
||||
fi
|
||||
log_warn "Waiting for SSH... (${attempt}/${max_attempts})"; sleep ${SSH_RETRY_DELAY}; attempt=$((attempt + 1))
|
||||
log_warn "Waiting for SSH... (${attempt}/${max_attempts})"; sleep "${SSH_RETRY_DELAY}"; attempt=$((attempt + 1))
|
||||
done
|
||||
log_error "Server failed to respond via SSH after ${max_attempts} attempts"; return 1
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ verify_sprite_connectivity() {
|
|||
return 0
|
||||
fi
|
||||
log_warn "Sprite not ready, retrying (${attempt}/${max_attempts})..."
|
||||
sleep ${SPRITE_CONNECTIVITY_POLL_DELAY}
|
||||
sleep "${SPRITE_CONNECTIVITY_POLL_DELAY}"
|
||||
((attempt++))
|
||||
done
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue