mirror of
https://github.com/rvalitov/zabbix-php-fpm.git
synced 2023-11-05 03:30:27 +01:00
[add] sort cache and results
This commit is contained in:
parent
2b2dfa435d
commit
ab44dad6ec
@ -224,7 +224,8 @@ function discoverAll() {
|
|||||||
else
|
else
|
||||||
DATA_COUNT=$(echo "$DATA_COUNT + 1" | bc)
|
DATA_COUNT=$(echo "$DATA_COUNT + 1" | bc)
|
||||||
if [[ $DATA_COUNT -gt 10 ]]; then
|
if [[ $DATA_COUNT -gt 10 ]]; then
|
||||||
echo "Data old: $DATA_OLD, data new: $DATA"
|
echo "Data old: $DATA_OLD"
|
||||||
|
echo "Data new: $DATA"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
discoverAll "$DATA" "$DATA_COUNT"
|
discoverAll "$DATA" "$DATA_COUNT"
|
||||||
|
@ -300,6 +300,9 @@ function SavePrintResults() {
|
|||||||
PrintDebug "Saving pending pools list to file $PENDING_FILE..."
|
PrintDebug "Saving pending pools list to file $PENDING_FILE..."
|
||||||
${S_PRINTF} "%s\n" "${PENDING_LIST[@]}" >"$PENDING_FILE"
|
${S_PRINTF} "%s\n" "${PENDING_LIST[@]}" >"$PENDING_FILE"
|
||||||
|
|
||||||
|
#We must sort the cache list
|
||||||
|
readarray -t CACHE < <(for a in "${CACHE[@]}"; do echo "$a"; done | sort)
|
||||||
|
|
||||||
if [[ -n $DEBUG_MODE ]]; then
|
if [[ -n $DEBUG_MODE ]]; then
|
||||||
PrintDebug "List of pools to be saved to cache pools file:"
|
PrintDebug "List of pools to be saved to cache pools file:"
|
||||||
PrintCacheList
|
PrintCacheList
|
||||||
|
Loading…
Reference in New Issue
Block a user