From a392f708a7f16af0b7df3625040ad8211e99470c Mon Sep 17 00:00:00 2001 From: hailin Date: Tue, 3 Mar 2026 08:27:57 -0800 Subject: [PATCH] =?UTF-8?q?fix(mining):=20=E4=BF=AE=E5=A4=8D=20DailySnapsh?= =?UTF-8?q?ot=20API=20=E8=B7=AF=E5=BE=84=20v1=E2=86=92v2=20+=20deploy-mini?= =?UTF-8?q?ng.sh=20=E9=BB=98=E8=AE=A4=20standalone?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - fetchContributionRatios URL 从 /api/v1/ 改为 /api/v2/ 与 contribution-service 的 globalPrefix 匹配 - deploy-mining.sh 默认部署模式从 shared 改为 standalone Co-Authored-By: Claude Opus 4.6 --- backend/services/deploy-mining.sh | 8 ++++---- .../src/application/services/contribution-sync.service.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/services/deploy-mining.sh b/backend/services/deploy-mining.sh index 006e61d6..39827e23 100755 --- a/backend/services/deploy-mining.sh +++ b/backend/services/deploy-mining.sh @@ -8,8 +8,8 @@ # affecting the 1.0 system. # # Deploy Modes (set via DEPLOY_MODE env var): -# shared (default) Co-located with 1.0, shares PostgreSQL/Redis/Kafka -# standalone Separate server with local PostgreSQL/Redis, remote Kafka (192.168.1.111:9093) +# standalone (default) Separate server with local PostgreSQL/Redis, remote Kafka (192.168.1.111:9093) +# shared Co-located with 1.0, shares PostgreSQL/Redis/Kafka (use: DEPLOY_MODE=shared) # # Usage: # ./deploy-mining.sh up [service] # Start all or specific service @@ -60,8 +60,8 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" ENV_FILE="$SCRIPT_DIR/.env" COMPOSE_FILE="$SCRIPT_DIR/docker-compose.2.0.yml" -# Deployment mode: "shared" (default, same server as 1.0) or "standalone" (separate server) -DEPLOY_MODE="${DEPLOY_MODE:-shared}" +# Deployment mode: "standalone" (default, separate server) or "shared" (same server as 1.0) +DEPLOY_MODE="${DEPLOY_MODE:-standalone}" # 2.0 Services MINING_SERVICES=( diff --git a/backend/services/mining-service/src/application/services/contribution-sync.service.ts b/backend/services/mining-service/src/application/services/contribution-sync.service.ts index e101c090..a9fdc597 100644 --- a/backend/services/mining-service/src/application/services/contribution-sync.service.ts +++ b/backend/services/mining-service/src/application/services/contribution-sync.service.ts @@ -124,7 +124,7 @@ export class ContributionSyncService { pageSize: number, ): Promise<{ data: ContributionData[]; total: number } | null> { try { - const url = `${baseUrl}/api/v1/snapshots/${snapshotDate}/ratios?page=${page}&pageSize=${pageSize}`; + const url = `${baseUrl}/api/v2/snapshots/${snapshotDate}/ratios?page=${page}&pageSize=${pageSize}`; const response = await fetch(url); if (!response.ok) {