Initial AlphaPulse implementation: news crawler and Binance klines
- Backend (FastAPI, SQLAlchemy 2, Alembic): single-admin cookie auth, news/crawler/market APIs with SSE and WebSocket streaming - Crawler (Scrapy + Scrapy-Redis): wscn_news, wscn_live, cls_depth, cls_telegraph spiders, idempotent upserts with revisions, raw response archiving, per-source subprocess supervision, restart and backoff - Market worker: full-history Binance spot/USD-M kline backfill, realtime WS stream, hourly and on-reconnect catch-up - Frontend (Vue 3, Element Plus, UnoCSS, KLineChart): news feed, crawler console with live logs, Binance-style chart page - Deploy: docker compose, nginx site, migrate and daily backup scripts
This commit is contained in:
commit
aabc81ba5b
88 files changed
+12603
No files matched your search
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
# 每日备份 alphapulse 库,保留最近 14 份;backrest 03:00 会把 /srv 整体备份到异地
|
||||
set -eu
|
||||
dir=/srv/AlphaPulse/backups/daily
|
||||
mkdir -p "$dir"
|
||||
target="$dir/alphapulse-$(date +%Y%m%d).dump"
|
||||
# 先写临时文件,成功后再改名,避免留下半截备份
|
||||
docker exec postgres pg_dump -U alphapulse -Fc alphapulse > "$target.tmp"
|
||||
mv "$target.tmp" "$target"
|
||||
ls -1t "$dir"/alphapulse-*.dump | tail -n +15 | xargs -r rm --
|
||||
echo "$(date '+%F %T') 备份完成:$target $(du -h "$target" | cut -f1)"
|
||||
Reference in new issue
Block a user