mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 21:23:45 +01:00
fix extraction of project ids in retry_failed_backups.sh GitOrigin-RevId: b1d7af8d9de84b0b28d14097f54a93893b93dd46
9 lines
494 B
Bash
9 lines
494 B
Bash
#!/bin/sh
|
|
# Extract project IDs with pending backups older than the configured timeout (default: 10000 seconds)
|
|
RETRY_TIMEOUT="${RETRY_TIMEOUT:-10000}"
|
|
ids=$(node storage/scripts/backup_scheduler.mjs --show-pending="$RETRY_TIMEOUT" | grep '^{' | grep 'projectId' | jq -r '.projectId' | sort -u)
|
|
# Retry backups for each project ID with a concurrency of 5 blob uploads at a time
|
|
for project_id in $ids ; do
|
|
LOG_LEVEL=debug node storage/scripts/backup.mjs --projectId="$project_id" -c 2 ;
|
|
done
|