fix: 修复发布问题

This commit is contained in:
richarjiang
2026-03-16 22:00:47 +08:00
parent a230122faf
commit ab00443056
3 changed files with 5 additions and 5 deletions

View File

@@ -7,7 +7,7 @@
import { db } from "@/lib/db";
import { claws, heartbeats, tasks, tokenUsage } from "@/lib/db/schema";
import { sql, eq, and, gte } from "drizzle-orm";
import { sql, eq, and, gte, lte } from "drizzle-orm";
import { redis } from "@/lib/redis";
const ACTIVE_CLAWS_KEY = "active:claws";
@@ -80,7 +80,7 @@ async function syncRedisStats() {
.where(sql`region IS NOT NULL`)
.groupBy(claws.region);
const regionData: Record<string, string> = {};
const regionData: Record<string, number> = {};
for (const stat of regionStats) {
if (stat.region) {
regionData[stat.region] = stat.count;
@@ -129,7 +129,7 @@ async function syncRedisStats() {
.where(
and(
gte(heartbeats.timestamp, hourStart),
gte(hourEnd, heartbeats.timestamp)
lte(heartbeats.timestamp, hourEnd)
)
);