fix: comparison condition error in scheduleSnapshot

This commit is contained in:
alikia2x (寒寒) 2025-04-18 22:38:02 +08:00
parent 2c47105913
commit 244298913a
Signed by: alikia2x
GPG Key ID: 56209E0CCD8420C6

View File

@ -201,7 +201,7 @@ export async function scheduleSnapshot(
if (type == "milestone" && hashActiveSchedule) { if (type == "milestone" && hashActiveSchedule) {
const latestActiveSchedule = await getLatestActiveScheduleWithType(client, aid, type); const latestActiveSchedule = await getLatestActiveScheduleWithType(client, aid, type);
const latestScheduleStartedAt = new Date(parseTimestampFromPsql(latestActiveSchedule.started_at!)); const latestScheduleStartedAt = new Date(parseTimestampFromPsql(latestActiveSchedule.started_at!));
if (latestScheduleStartedAt < adjustedTime) { if (latestScheduleStartedAt > adjustedTime) {
await client.queryObject(` await client.queryObject(`
UPDATE snapshot_schedule UPDATE snapshot_schedule
SET started_at = $1 SET started_at = $1