check the sync status before reporting a node as available to serve
This commit is contained in:
@@ -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
|
||||||
required_space=$existing_size
|
status=$(./sync-status "$1")
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
# 0 means it's synced
|
||||||
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user