Commit 46ca1f27 by yiling.shen

Add direct clinic JSON file checking to diagnose missing clinic data issue

parent 57f98a6c
Pipeline #3194 passed with stages
in 1 minute 22 seconds
......@@ -39,6 +39,10 @@ deploy_to_production:
- ssh -p $SSH_PORT $SSH_USER@$SSH_HOST "cd customer-recall && docker compose exec -T db mysql -u callback_user -p'$DB_PASSWORD' -e 'SELECT COUNT(*) as clinic_count FROM clinics;' callback_system 2>/dev/null || echo 'Database connection failed'"
- echo "Checking clinic data"
- ssh -p $SSH_PORT $SSH_USER@$SSH_HOST "cd customer-recall && docker compose exec -T app python -c \"import sys; sys.path.append('.'); from database_manager import DatabaseManager; db = DatabaseManager(); print('Clinics:', db.get_all_clinics())\" 2>/dev/null || echo 'Clinic data check failed'"
- echo "Checking clinic JSON files directly"
- ssh -p $SSH_PORT $SSH_USER@$SSH_HOST "cd customer-recall && ls -la 诊所患者json/ 2>/dev/null || echo '诊所患者json directory not found'"
- echo "Checking specific clinic files"
- ssh -p $SSH_PORT $SSH_USER@$SSH_HOST "cd customer-recall && for file in 东亭门诊.json 大丰门诊.json 惠山门诊.json 新吴门诊.json 河埒门诊.json 红豆门诊.json 通善口腔医院.json 马山门诊.json 学前街门诊.json; do if [ -f \"诊所患者json/\$file\" ]; then echo \"✓ \$file exists\"; else echo \"✗ \$file missing\"; fi; done"
- echo "Checking backup files"
- ssh -p $SSH_PORT $SSH_USER@$SSH_HOST "ls -lh /backup/database/production_backup_*.sql 2>/dev/null || echo 'No backup files found'"
- echo "Deployment completed successfully"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment