mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-15 10:30:37 +09:00
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:
parent
8f5196f7d6
commit
500d926da7
3 changed files with 654 additions and 292 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue