Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
woops
Browse files Browse the repository at this point in the history
  • Loading branch information
Heavybullets8 committed Aug 20, 2023
1 parent 7f05085 commit ad0d3d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions functions/backup_restore/database/cnpg_dump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ backup_cnpg_databases() {
db_dump_stopped=true
fi

if [[ $db_dump_stopped == true ]]; then
if [[ $db_dump_stopped == false ]]; then
# Store the current replica counts for all deployments in the app before scaling down
declare -A original_replicas=()
mapfile -t replica_lines < <(get_current_replica_counts "$app_name" | jq -r 'to_entries | .[] | "\(.key)=\(.value)"')
Expand All @@ -203,11 +203,11 @@ backup_cnpg_databases() {
fi

if [[ $db_dump_stopped == true ]];then
stop_app "direct" "$app_name" 5000
stop_app "direct" "$app_name"
continue
fi

if [[ $db_dump_stopped == true ]]; then
if [[ $db_dump_stopped == false ]]; then
for deployment in "${!original_replicas[@]}"; do
if [[ ${original_replicas[$deployment]} -ne 0 ]]; then
scale_resources "$app_name" 300 "${original_replicas[$deployment]}" "$deployment" > /dev/null 2>&1
Expand Down
2 changes: 1 addition & 1 deletion utils/stop_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ stop_app() {
local stop_type app_name timeout status
stop_type="$1"
app_name="$2"
timeout=${3:-300}
timeout="150"

handle_timeout() {
local timeout_result=$1
Expand Down

0 comments on commit ad0d3d3

Please sign in to comment.