Add .gitignore, update paths, remove tracked artifacts
- Add .gitignore for __pycache__, *.db, *.log, nohup.out - Update CLAUDE.md paths from /tmp/badge-admin to /home/gpsystem - Remove cached/generated files from git tracking via HAPI (https://hapi.run) Co-Authored-By: HAPI <noreply@hapi.run>
This commit is contained in:
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
*.db
|
||||||
|
*.log
|
||||||
|
nohup.out
|
||||||
|
.claude/
|
||||||
@@ -8,7 +8,7 @@ KKS P240/P241 蓝牙工牌管理后台,基于 FastAPI + SQLAlchemy + asyncio T
|
|||||||
## 项目结构
|
## 项目结构
|
||||||
|
|
||||||
```
|
```
|
||||||
/tmp/badge-admin/
|
/home/gpsystem/
|
||||||
├── run.py # 启动脚本 (uvicorn)
|
├── run.py # 启动脚本 (uvicorn)
|
||||||
├── requirements.txt # Python 依赖
|
├── requirements.txt # Python 依赖
|
||||||
├── frpc.toml # FRP 客户端配置 (TCP隧道)
|
├── frpc.toml # FRP 客户端配置 (TCP隧道)
|
||||||
@@ -83,7 +83,7 @@ cd /tmp/badge-admin
|
|||||||
nohup python3 -m uvicorn app.main:app --host 0.0.0.0 --port 8088 > server.log 2>&1 &
|
nohup python3 -m uvicorn app.main:app --host 0.0.0.0 --port 8088 > server.log 2>&1 &
|
||||||
|
|
||||||
# 启动 FRP 客户端 (TCP隧道)
|
# 启动 FRP 客户端 (TCP隧道)
|
||||||
nohup /tmp/frpc -c /tmp/badge-admin/frpc.toml > /tmp/frpc.log 2>&1 &
|
nohup /tmp/frpc -c /home/gpsystem/frpc.toml > /tmp/frpc.log 2>&1 &
|
||||||
|
|
||||||
# 检查服务状态
|
# 检查服务状态
|
||||||
curl http://localhost:8088/health
|
curl http://localhost:8088/health
|
||||||
@@ -376,12 +376,12 @@ remotePort = 5001
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 查看实时日志
|
# 查看实时日志
|
||||||
tail -f /tmp/badge-admin/server.log | grep -aE "TCP|login|heartbeat|error|geocod|Tianditu" --line-buffered
|
tail -f /home/gpsystem/server.log | grep -aE "TCP|login|heartbeat|error|geocod|Tianditu" --line-buffered
|
||||||
|
|
||||||
# 检查数据库
|
# 检查数据库
|
||||||
python3 -c "
|
python3 -c "
|
||||||
import sqlite3
|
import sqlite3
|
||||||
conn = sqlite3.connect('/tmp/badge-admin/badge_admin.db')
|
conn = sqlite3.connect('/home/gpsystem/badge_admin.db')
|
||||||
cur = conn.cursor()
|
cur = conn.cursor()
|
||||||
cur.execute('SELECT id, imei, device_type, status, battery_level FROM devices')
|
cur.execute('SELECT id, imei, device_type, status, battery_level FROM devices')
|
||||||
for row in cur.fetchall(): print(row)
|
for row in cur.fetchall(): print(row)
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
badge_admin.db
BIN
badge_admin.db
Binary file not shown.
43
nohup.out
43
nohup.out
@@ -1,43 +0,0 @@
|
|||||||
INFO: Started server process [2696342]
|
|
||||||
INFO: Waiting for application startup.
|
|
||||||
2026-03-15 11:04:52,415 - app.main - INFO - Initializing database...
|
|
||||||
2026-03-15 11:04:52,417 INFO sqlalchemy.engine.Engine BEGIN (implicit)
|
|
||||||
2026-03-15 11:04:52,417 - sqlalchemy.engine.Engine - INFO - BEGIN (implicit)
|
|
||||||
2026-03-15 11:04:52,417 INFO sqlalchemy.engine.Engine PRAGMA main.table_info("devices")
|
|
||||||
2026-03-15 11:04:52,417 - sqlalchemy.engine.Engine - INFO - PRAGMA main.table_info("devices")
|
|
||||||
2026-03-15 11:04:52,417 INFO sqlalchemy.engine.Engine [raw sql] ()
|
|
||||||
2026-03-15 11:04:52,417 - sqlalchemy.engine.Engine - INFO - [raw sql] ()
|
|
||||||
2026-03-15 11:04:52,418 INFO sqlalchemy.engine.Engine PRAGMA main.table_info("location_records")
|
|
||||||
2026-03-15 11:04:52,418 - sqlalchemy.engine.Engine - INFO - PRAGMA main.table_info("location_records")
|
|
||||||
2026-03-15 11:04:52,418 INFO sqlalchemy.engine.Engine [raw sql] ()
|
|
||||||
2026-03-15 11:04:52,418 - sqlalchemy.engine.Engine - INFO - [raw sql] ()
|
|
||||||
2026-03-15 11:04:52,419 INFO sqlalchemy.engine.Engine PRAGMA main.table_info("alarm_records")
|
|
||||||
2026-03-15 11:04:52,419 - sqlalchemy.engine.Engine - INFO - PRAGMA main.table_info("alarm_records")
|
|
||||||
2026-03-15 11:04:52,419 INFO sqlalchemy.engine.Engine [raw sql] ()
|
|
||||||
2026-03-15 11:04:52,419 - sqlalchemy.engine.Engine - INFO - [raw sql] ()
|
|
||||||
2026-03-15 11:04:52,419 INFO sqlalchemy.engine.Engine PRAGMA main.table_info("heartbeat_records")
|
|
||||||
2026-03-15 11:04:52,419 - sqlalchemy.engine.Engine - INFO - PRAGMA main.table_info("heartbeat_records")
|
|
||||||
2026-03-15 11:04:52,419 INFO sqlalchemy.engine.Engine [raw sql] ()
|
|
||||||
2026-03-15 11:04:52,419 - sqlalchemy.engine.Engine - INFO - [raw sql] ()
|
|
||||||
2026-03-15 11:04:52,419 INFO sqlalchemy.engine.Engine PRAGMA main.table_info("attendance_records")
|
|
||||||
2026-03-15 11:04:52,419 - sqlalchemy.engine.Engine - INFO - PRAGMA main.table_info("attendance_records")
|
|
||||||
2026-03-15 11:04:52,419 INFO sqlalchemy.engine.Engine [raw sql] ()
|
|
||||||
2026-03-15 11:04:52,419 - sqlalchemy.engine.Engine - INFO - [raw sql] ()
|
|
||||||
2026-03-15 11:04:52,420 INFO sqlalchemy.engine.Engine PRAGMA main.table_info("bluetooth_records")
|
|
||||||
2026-03-15 11:04:52,420 - sqlalchemy.engine.Engine - INFO - PRAGMA main.table_info("bluetooth_records")
|
|
||||||
2026-03-15 11:04:52,420 INFO sqlalchemy.engine.Engine [raw sql] ()
|
|
||||||
2026-03-15 11:04:52,420 - sqlalchemy.engine.Engine - INFO - [raw sql] ()
|
|
||||||
2026-03-15 11:04:52,420 INFO sqlalchemy.engine.Engine PRAGMA main.table_info("command_logs")
|
|
||||||
2026-03-15 11:04:52,420 - sqlalchemy.engine.Engine - INFO - PRAGMA main.table_info("command_logs")
|
|
||||||
2026-03-15 11:04:52,420 INFO sqlalchemy.engine.Engine [raw sql] ()
|
|
||||||
2026-03-15 11:04:52,420 - sqlalchemy.engine.Engine - INFO - [raw sql] ()
|
|
||||||
2026-03-15 11:04:52,420 INFO sqlalchemy.engine.Engine COMMIT
|
|
||||||
2026-03-15 11:04:52,420 - sqlalchemy.engine.Engine - INFO - COMMIT
|
|
||||||
2026-03-15 11:04:52,420 - app.main - INFO - Starting TCP server on 0.0.0.0:5000
|
|
||||||
INFO: Application startup complete.
|
|
||||||
ERROR: [Errno 98] error while attempting to bind on address ('0.0.0.0', 8088): address already in use
|
|
||||||
INFO: Waiting for application shutdown.
|
|
||||||
2026-03-15 11:04:52,421 - app.tcp_server - INFO - KKS TCP server listening on ('0.0.0.0', 5000)
|
|
||||||
2026-03-15 11:04:52,421 - app.main - INFO - Shutting down TCP server...
|
|
||||||
2026-03-15 11:04:52,421 - app.tcp_server - INFO - KKS TCP server stopped
|
|
||||||
INFO: Application shutdown complete.
|
|
||||||
1854
server.log
1854
server.log
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user