Skip to content

Commit

Permalink
workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanminutillo committed Jan 8, 2025
1 parent 0fd016b commit 373ab0b
Showing 1 changed file with 5 additions and 27 deletions.
32 changes: 5 additions & 27 deletions .github/workflows/watch-repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,43 +239,21 @@ jobs:
echo "Found $total_files files to process in $total_batches batches"
# Process batch URLs
mapfile -t batch_urls < <(jq -r '.batchUrls[]' response.json)
total_batches=$(jq -r '.totalBatches' response.json)
if [ ${#batch_urls[@]} -eq 0 ]; then
echo "::error::No batch URLs found in response"
if [ -z "$total_batches" ] || [ "$total_batches" -eq 0 ]; then
echo "::error::No batches found in response"
cat response.json
exit 1
fi
# Validate URL formats
for url in "${batch_urls[@]}"; do
if [[ ! "$url" =~ ^https?:// ]]; then
echo "::error::Invalid URL format (missing protocol): $url"
exit 1
fi
done
# Process batches
# Then directly use the total_batches value for processing
echo "Starting batch processing..."
successful_batches=0
failed_batches=0
# Get total batches from response
total_batches=$(jq -r '.totalBatches' response.json)
for batch in $(seq 0 $((total_batches - 1))); do
echo "Processing batch $((batch + 1)) of $total_batches"
# Call process-batch endpoint with POST
Expand Down

0 comments on commit 373ab0b

Please sign in to comment.