mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
cdb3db4049
Signed-off-by: Joey Hotz <joeyhotz1@gmail.com>
28 lines
1.0 KiB
TypeScript
28 lines
1.0 KiB
TypeScript
import type { Pool } from 'pg';
|
|
|
|
type PgConnectionConfig =
|
|
| { connectionString: string; maxPoolSize?: number; pool?: undefined }
|
|
| { pool: Pool; connectionString?: undefined; maxPoolSize?: undefined };
|
|
|
|
export type PostgresWorldConfig = PgConnectionConfig & {
|
|
jobPrefix?: string;
|
|
/**
|
|
* namespace for queue topic prefixes (e.g. 'custom' → '__custom_wkf_workflow_').
|
|
* defaults to WORKFLOW_QUEUE_NAMESPACE env var if not provided.
|
|
*/
|
|
namespace?: string;
|
|
queueConcurrency?: number;
|
|
/**
|
|
* Whether the application coordinates shutdown instead of Graphile Worker
|
|
* responding automatically. The application must await world.close().
|
|
* Defaults to false. The package's default createWorld() configuration
|
|
* enables it when WORKFLOW_POSTGRES_APPLICATION_MANAGED_SHUTDOWN is `1`.
|
|
*/
|
|
applicationManagedShutdown?: boolean;
|
|
/**
|
|
* Override the flush interval (in ms) for buffered stream writes.
|
|
* Default is 10ms. Set to 0 for immediate flushing.
|
|
*/
|
|
streamFlushIntervalMs?: number;
|
|
};
|