20 lines
1.2 KiB
TypeScript
20 lines
1.2 KiB
TypeScript
// SPDX-License-Identifier: LicenseRef-ConusAI-Template-1.0
|
|
// The Convex cron registrations of this app: the outbox relay runs every minute (spec §5.4's
|
|
// "outbox events are scheduled internal mutations", drained on a beat). Backups run in the
|
|
// profile's sidecar because `convex export` is an admin CLI operation, not a Convex function.
|
|
|
|
import { cronJobs } from "convex/server"
|
|
import { internal } from "./_generated/api"
|
|
|
|
const crons = cronJobs()
|
|
crons.interval("outbox relay", { minutes: 1 }, internal.relay.relayPass, {})
|
|
crons.interval("file upload and delete recovery", { minutes: 5 }, internal.files.recoverRows, {})
|
|
crons.interval("action job lease recovery", { minutes: 5 }, internal.conusaiJobs.reclaimActionJobs, {})
|
|
// The account module's deletion sweep (the Postgres worker's DELETION_SWEEP_JOB, every five minutes).
|
|
crons.interval("account deletion sweep", { minutes: 5 }, internal.account.sweep, {})
|
|
// The sign-out revocation outbox (the Postgres worker's REVOCATION_JOB, every minute): each row carries
|
|
// its own backoff, so a run asks only the modules whose retry is due.
|
|
crons.interval("account session revocations", { minutes: 1 }, internal.account.revocationSweep, {})
|
|
|
|
export default crons
|