Stop PM2 before PostgreSQL init to free connection pool.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -66,6 +66,12 @@ echo "==> Python 依赖..."
|
||||
source "$APP_DIR/venv/bin/activate"
|
||||
pip install -q -r "$APP_DIR/requirements.txt"
|
||||
|
||||
echo "==> 停止 qihuo(释放数据库连接)..."
|
||||
if pm2 describe qihuo &>/dev/null; then
|
||||
pm2 stop qihuo || true
|
||||
sleep 2
|
||||
fi
|
||||
|
||||
if [ "$MIGRATE_SQLITE" = "1" ]; then
|
||||
echo "==> 重置 PostgreSQL 库(迁移模式)..."
|
||||
sudo -u postgres psql -v ON_ERROR_STOP=0 -c \
|
||||
|
||||
Reference in New Issue
Block a user