We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f5d255 commit b62c2e5Copy full SHA for b62c2e5
docker/all-in-one/shutdown.sh
@@ -65,6 +65,11 @@ SQL
65
fi
66
}
67
68
+# Wait for Postgres to be up
69
+until pg_isready -h localhost > /dev/null 2>&1;
70
+ do sleep 3
71
+done
72
+
73
# Enable logging of disconnections so the script can check when the last disconnection happened
74
run_sql -c "ALTER SYSTEM SET log_disconnections = 'on';"
75
run_sql -c "SELECT pg_reload_conf();"
@@ -83,6 +88,9 @@ while true; do
83
88
MAX_IDLE_TIME_MINUTES="$DEFAULT_MAX_IDLE_TIME_MINUTES"
84
89
85
90
86
- check_activity
91
+ if [ "$MAX_IDLE_TIME_MINUTES" -gt 0 ] && [ "$MAX_IDLE_TIME_MINUTES" -lt 50000000 ]; then
92
+ check_activity
93
+ fi
94
87
95
sleep 30
96
done
0 commit comments