guoziyun vor 8 Monaten
Ursprung
Commit
84c8c3e034

+ 2 - 2
oms/dist/src/scripts/backfill-done-rate-tip-count.js

@@ -14,7 +14,7 @@ const CLICKHOUSE_EVENTS_TABLE = "events";
 // =========================================================================
 // !!! 必须修改这里以设置回填的起始日期 (YYYY-MM-DD 格式) !!!
 // 示例: 如果您的 tipCount 追踪是从 2024 年 1 月 1 日开始的,则设置为 "2024-01-01"
-const BACKFILL_START_DATE = "2025-01-03";
+const BACKFILL_START_DATE = "2025-10-08";
 /**
  * 遍历指定日期范围,从 ClickHouse 提取 tipCount 并回填到 DoneRate 记录中。
  * @returns Promise<string> - 返回回填结果的摘要信息。
@@ -58,7 +58,7 @@ async function runBackfill() {
                 // 如果当天没有 tip 事件,但可能存在 DoneRate 记录,我们仍然需要更新它们 (如果它们是 null 或 undefined)
                 // 但由于 DoneRateModel 默认 tipCount: 0,所以我们只需要处理有 tip 事件的记录。
                 console.log(`[TipCount Backfill] No 'color_tip' events found for ${currentYYYYMMDD}. Skipping MongoDB update.`);
-                continue;
+                // continue;
             }
             // 2. 批量更新 MongoDB 中的 DoneRate 记录
             const bulkOps = tipResults

+ 1 - 2
oms/dist/src/scripts/run-tip-count.js

@@ -1,10 +1,9 @@
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 const backfill_done_rate_tip_count_1 = require("./backfill-done-rate-tip-count");
-const initialize_tip_count_1 = require("./initialize-tip-count");
 const recalculate_total_done_rate_1 = require("./recalculate-total-done-rate");
 async function run() {
-    await (0, initialize_tip_count_1.runInitialization)();
+    // await runInitialization();
     await (0, backfill_done_rate_tip_count_1.runBackfill)();
     await (0, recalculate_total_done_rate_1.runRecalculation)();
 }

+ 2 - 2
oms/src/scripts/backfill-done-rate-tip-count.ts

@@ -10,7 +10,7 @@ const CLICKHOUSE_EVENTS_TABLE = "events";
 // =========================================================================
 // !!! 必须修改这里以设置回填的起始日期 (YYYY-MM-DD 格式) !!!
 // 示例: 如果您的 tipCount 追踪是从 2024 年 1 月 1 日开始的,则设置为 "2024-01-01"
-const BACKFILL_START_DATE = "2025-01-03";
+const BACKFILL_START_DATE = "2025-10-08";
 // =========================================================================
 
 /**
@@ -73,7 +73,7 @@ export async function runBackfill(): Promise<string> {
         // 如果当天没有 tip 事件,但可能存在 DoneRate 记录,我们仍然需要更新它们 (如果它们是 null 或 undefined)
         // 但由于 DoneRateModel 默认 tipCount: 0,所以我们只需要处理有 tip 事件的记录。
         console.log(`[TipCount Backfill] No 'color_tip' events found for ${currentYYYYMMDD}. Skipping MongoDB update.`);
-        continue;
+        // continue;
       }
 
       // 2. 批量更新 MongoDB 中的 DoneRate 记录

+ 1 - 1
oms/src/scripts/run-tip-count.ts

@@ -3,7 +3,7 @@ import { runInitialization } from "./initialize-tip-count";
 import { runRecalculation } from "./recalculate-total-done-rate";
 
 async function run() {
-  await runInitialization();
+  // await runInitialization();
   await runBackfill();
   await runRecalculation();
 }