check the sync status before reporting a node as available to serve

This commit is contained in:
Sebastian
2024-03-25 07:19:20 +01:00
parent 0e34199386
commit 475fcb4c21

View File

@@ -60,7 +60,11 @@ for key in $keys; do
if [ -z "$newest_file" ]; then if [ -z "$newest_file" ]; then
if [[ "$2" = "--print-size-only" && $existing_size -gt 0 ]]; then if [[ "$2" = "--print-size-only" && $existing_size -gt 0 ]]; then
# I only want to have a theoretical file size # I only want to have a theoretical file size
status=$(./sync-status "$1")
if [ $? -eq 0 ]; then
# 0 means it's synced
required_space=$existing_size required_space=$existing_size
fi
#GB=$(echo "$existing_size / 1024 / 1024 / 1024" | bc ) #GB=$(echo "$existing_size / 1024 / 1024 / 1024" | bc )
#echo "$GB" #echo "$GB"
#exit 0 #exit 0