CreateDrizzleJobQueueOptions
Defined in: packages/messaging/src/adapters/cloudflare/index.ts:197
Options of the queues that lease the jobs dequeue() returns.
Extends
섹션 제목: “Extends”Type Parameters
섹션 제목: “Type Parameters”T = unknown
Properties
섹션 제목: “Properties”close?
섹션 제목: “close?”
optionalclose?: () =>void|Promise<void>
Defined in: packages/messaging/src/adapters/cloudflare/sql-client.ts:51
Returns
섹션 제목: “Returns”void | Promise<void>
Inherited from
섹션 제목: “Inherited from”CreateDrizzleSqlClientOptions.close
Defined in: packages/messaging/src/adapters/cloudflare/sql-client.ts:39
Inherited from
섹션 제목: “Inherited from”CreateDrizzleSqlClientOptions.db
dialect
섹션 제목: “dialect”dialect:
SqlDialect
Defined in: packages/messaging/src/adapters/cloudflare/sql-client.ts:38
Inherited from
섹션 제목: “Inherited from”CreateDrizzleSqlClientOptions.dialect
indexNames?
섹션 제목: “indexNames?”
optionalindexNames?:Partial<JobQueueIndexNames>
Defined in: packages/messaging/src/adapters/cloudflare/index.ts:201
initializeSchema?
섹션 제목: “initializeSchema?”
optionalinitializeSchema?:boolean
Defined in: packages/messaging/src/adapters/cloudflare/index.ts:207
Whether the queue creates its table and indexes on first use. Set it to
false when migrations create the schema.
Default
섹션 제목: “Default”trueleaseMs?
섹션 제목: “leaseMs?”
optionalleaseMs?:number
Defined in: packages/messaging/src/queue/job-queue.interface.ts:64
How long a dequeued job may stay processing before it is due again
(default: Infinity, no lease). If it is neither completed nor failed
by then, for example because the worker stopped mid-job, the next
dequeue() counts the lost attempt as failed (error: "LEASE_EXPIRED")
and makes the job due again, or fails it when no attempts are left.
Set it above the longest time a job can take: a lease is not renewed,
and a worker that outlives it can still complete or fail the job while
another worker has it. dequeue() leaves the jobs its caller names as
still running alone, which is how JobProcessor keeps a job it is
still running from being run again or counted as lost.
Inherited from
섹션 제목: “Inherited from”mapTransactionDb?
섹션 제목: “mapTransactionDb?”
optionalmapTransactionDb?: (value) =>DrizzleSqlDatabaseLike
Defined in: packages/messaging/src/adapters/cloudflare/sql-client.ts:50
Parameters
섹션 제목: “Parameters”value
섹션 제목: “value”unknown
Returns
섹션 제목: “Returns”Inherited from
섹션 제목: “Inherited from”CreateDrizzleSqlClientOptions.mapTransactionDb
normalizeResult?
섹션 제목: “normalizeResult?”
optionalnormalizeResult?: <T>(input) =>CloudflareSqlQueryResult<T>
Defined in: packages/messaging/src/adapters/cloudflare/sql-client.ts:45
Type Parameters
섹션 제목: “Type Parameters”T = Record<string, unknown>
Parameters
섹션 제목: “Parameters”input
섹션 제목: “input”params
섹션 제목: “params”readonly unknown[]
result
섹션 제목: “result”unknown
sql
섹션 제목: “sql”string
Returns
섹션 제목: “Returns”Inherited from
섹션 제목: “Inherited from”CreateDrizzleSqlClientOptions.normalizeResult
onLeaseExpired?
섹션 제목: “onLeaseExpired?”
optionalonLeaseExpired?: (job) =>void|Promise<void>
Defined in: packages/messaging/src/queue/job-queue.interface.ts:72
Called by dequeue() for each job whose lease had expired, once the job
is stored pending again or, with no attempts left, failed. dequeue()
waits for it before it leases the job it returns, which may be the same
one, so it does not shorten that lease. What it throws is logged and
does not stop the dequeue.
Parameters
섹션 제목: “Parameters”job
섹션 제목: “job”Returns
섹션 제목: “Returns”void | Promise<void>
Inherited from
섹션 제목: “Inherited from”JobLeaseOptions.onLeaseExpired
renderQuery?
섹션 제목: “renderQuery?”
optionalrenderQuery?: (input) =>unknown
Defined in: packages/messaging/src/adapters/cloudflare/sql-client.ts:40
Parameters
섹션 제목: “Parameters”input
섹션 제목: “input”dialect
섹션 제목: “dialect”params
섹션 제목: “params”readonly unknown[]
sql
섹션 제목: “sql”string
Returns
섹션 제목: “Returns”unknown
Inherited from
섹션 제목: “Inherited from”CreateDrizzleSqlClientOptions.renderQuery
tableName?
섹션 제목: “tableName?”
optionaltableName?:string
Defined in: packages/messaging/src/adapters/cloudflare/index.ts:200