Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"generate:all": "pnpm run generate:importmap && pnpm run generate:types",
"lint": "cross-env NODE_OPTIONS=--no-deprecation next lint",
"payload": "cross-env NODE_OPTIONS=--no-deprecation payload",
"migrate": "NODE_OPTIONS=--no-deprecation payload migrate",
"start": "cross-env NODE_OPTIONS=--no-deprecation next start",
"test": "pnpm run test:int && pnpm run test:e2e",
"test:e2e": "cross-env NODE_OPTIONS=\"--no-deprecation --no-experimental-strip-types\" pnpm exec playwright test",
Expand Down
5 changes: 4 additions & 1 deletion src/lib/aiExtractionExportRowsJobs.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import type { PayloadRequest } from "payload";

export const AI_EXTRACTION_EXPORT_ROWS_SYNC_QUEUE =
process.env.PAYLOAD_JOBS_QUEUE || "everyMinute";
process.env.PAYLOAD_EXPORT_SYNC_QUEUE || "exportSync";

export const AI_EXTRACTION_EXPORT_ROWS_SYNC_CRON_SCHEDULE =
process.env.PAYLOAD_EXPORT_SYNC_CRON_SCHEDULE || "0 * * * *";

export type SyncAIExtractionExportRowsInput = {
aiExtractionId?: string;
Expand Down
8 changes: 8 additions & 0 deletions src/payload.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ import { isProd } from "@/utils/utils";
import { plugins } from "@/plugins";
import * as Sentry from "@sentry/nextjs";
import { defaultLocale, locales } from "@/utils/locales";
import {
AI_EXTRACTION_EXPORT_ROWS_SYNC_CRON_SCHEDULE,
AI_EXTRACTION_EXPORT_ROWS_SYNC_QUEUE,
} from "@/lib/aiExtractionExportRowsJobs";
import { en } from "@payloadcms/translations/languages/en";
import { fr } from "@payloadcms/translations/languages/fr";

Expand Down Expand Up @@ -98,6 +102,10 @@ export default buildConfig({
cron: process.env.PAYLOAD_JOBS_CRON_SCHEDULE || "* * * * *",
queue: process.env.PAYLOAD_JOBS_QUEUE || "everyMinute",
},
{
cron: AI_EXTRACTION_EXPORT_ROWS_SYNC_CRON_SCHEDULE,
queue: AI_EXTRACTION_EXPORT_ROWS_SYNC_QUEUE,
},
{
cron: "0 * * * *",
queue: process.env.PAYLOAD_JOBS_CLEANUP_QUEUE || "cleanup",
Expand Down
Loading