Refine routines editor flow
Align the routines list and detail editors with the issue-composer interaction model, and fix the scheduler's typed date comparison. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import crypto from "node:crypto";
|
||||
import { and, asc, desc, eq, inArray, isNull, ne, or, sql } from "drizzle-orm";
|
||||
import { and, asc, desc, eq, inArray, isNotNull, isNull, lte, ne, or } from "drizzle-orm";
|
||||
import type { Db } from "@paperclipai/db";
|
||||
import {
|
||||
agents,
|
||||
@@ -1030,8 +1030,8 @@ export function routineService(db: Db) {
|
||||
eq(routineTriggers.kind, "schedule"),
|
||||
eq(routineTriggers.enabled, true),
|
||||
eq(routines.status, "active"),
|
||||
sql`${routineTriggers.nextRunAt} is not null`,
|
||||
sql`${routineTriggers.nextRunAt} <= ${now}`,
|
||||
isNotNull(routineTriggers.nextRunAt),
|
||||
lte(routineTriggers.nextRunAt, now),
|
||||
),
|
||||
)
|
||||
.orderBy(asc(routineTriggers.nextRunAt), asc(routineTriggers.createdAt));
|
||||
|
||||
Reference in New Issue
Block a user