Interface SidetrackOptions<Queues>

interface SidetrackOptions<Queues extends SidetrackQueuesGenericType> {
    databaseOptions?: { databaseUrl: string };
    dbClient?: SidetrackDatabaseClient;
    disableDbClientInitialization?: boolean;
    payloadTransformer?: SidetrackPayloadTransformer;
    pollingInterval?: PollingInterval;
    queues: SidetrackQueues<Queues>;
    startOnInitialization?: boolean;
}

Type Parameters

Properties

databaseOptions?: { databaseUrl: string }
disableDbClientInitialization?: boolean

Disable the initialization of the database client (Sidetrack initializes one by default if not provided)

payloadTransformer?: SidetrackPayloadTransformer
pollingInterval?: PollingInterval

Number of milliseconds to wait between polling for new jobs Alternatively, pass in an Duration (@link https://effect-ts.github.io/effect/effect/Duration.ts.html)

startOnInitialization?: boolean

This is useful if you want it to automatically start polling when you initialize sidetrack instead of waiting to call start. Particularly useful if you are running sidetrack in a long running process on its own. e.g. if you are using Layer.launch with Effect (@link https://effect.website/docs/requirements-management/layers/#converting-a-layer-to-an-effect)