fp/services/our/graphile.config.ts
CJ_Clippy cc0f0a33fa
Some checks failed
rssapp CI/CD / build (push) Successful in 2m2s
ci / test (push) Failing after 1m5s
ci / build (push) Has been cancelled
add rssapp gitea actions builder
2025-09-28 00:55:50 -08:00

25 lines
833 B
TypeScript

import { LoadTaskFromJsPlugin } from "graphile-worker/dist/plugins/LoadTaskFromJsPlugin.js";
import { env } from "./src/config/env"
import path from 'node:path'
const __dirname = import.meta.dirname;
const preset: GraphileConfig.Preset = {
plugins: [LoadTaskFromJsPlugin], // here we override the WorkerPreset plugins which included the undesirable LoadTaskFromExecutableFilePlugin
worker: {
connectionString: env.DATABASE_URL,
maxPoolSize: 10,
pollInterval: 2000,
preparedStatements: true,
schema: "graphile_worker",
crontabFile: "crontab",
concurrentJobs: 1,
fileExtensions: [".cjs"],
taskDirectory: path.join(__dirname, 'dist', 'tasks'),
// to log debug messages, set GRAPHILE_LOGGER_DEBUG=1 in env @see https://worker.graphile.org/docs/library/logger
},
};
export default preset