@lunora/scheduler 1.0.0-alpha.20 → 1.0.0-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +22 -22
- package/dist/index.d.ts +22 -22
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -18,7 +18,7 @@ type ArgsOf<F extends FunctionReference> = F extends {
|
|
|
18
18
|
} ? A : Record<string, unknown>;
|
|
19
19
|
/**
|
|
20
20
|
* Typed reference to a Lunora durable workflow — either the generated
|
|
21
|
-
* `workflows
|
|
21
|
+
* `workflows.<name>` reference object (`_generated/api.ts`, which carries the
|
|
22
22
|
* `WORKFLOW_*` binding + export name) or, structurally, a `defineWorkflow()`
|
|
23
23
|
* result imported directly. Both are matched by the `isLunoraWorkflow` brand and
|
|
24
24
|
* carry the workflow's `params` in the phantom `__params`, so a `cronJobs()`
|
|
@@ -36,7 +36,7 @@ type ArgsOf<F extends FunctionReference> = F extends {
|
|
|
36
36
|
interface WorkflowReference<Params = Record<string, unknown>> {
|
|
37
37
|
/** Phantom carrier for the workflow's `params` type — drives `cronJobs()` arg inference. Never read at runtime. */
|
|
38
38
|
readonly __params?: Params;
|
|
39
|
-
/** The `WORKFLOW_*` binding name (present on a generated `workflows
|
|
39
|
+
/** The `WORKFLOW_*` binding name (present on a generated `workflows.<name>` ref). */
|
|
40
40
|
readonly binding?: string;
|
|
41
41
|
readonly isLunoraWorkflow: true;
|
|
42
42
|
/** The workflow's export/stable name (present on a generated ref; a `defineWorkflow({ name })` override otherwise). */
|
|
@@ -161,8 +161,8 @@ interface Scheduler {
|
|
|
161
161
|
/**
|
|
162
162
|
* Schedule `target` to run once, `delayMs` from now. `target` is a function
|
|
163
163
|
* {@link FunctionReference} (dispatched as a one-shot) or a durable
|
|
164
|
-
* {@link WorkflowReference} — the generated `workflows
|
|
165
|
-
* `agents
|
|
164
|
+
* {@link WorkflowReference} — the generated `workflows.<name>` /
|
|
165
|
+
* `agents.<name>` ref — which starts a fresh instance on fire (args become
|
|
166
166
|
* its `params`). {@link ScheduleTargetArgs} infers the accepted args from
|
|
167
167
|
* whichever target was passed.
|
|
168
168
|
*/
|
|
@@ -241,7 +241,7 @@ interface WorkpoolOptions extends LunoraSchedulerOptions {
|
|
|
241
241
|
maxConcurrency: number;
|
|
242
242
|
/**
|
|
243
243
|
* Pool name — the concurrency counter is keyed by this inside the
|
|
244
|
-
* SchedulerDO storage (`pool
|
|
244
|
+
* SchedulerDO storage (`pool:<name>`). Default `default`.
|
|
245
245
|
*/
|
|
246
246
|
name?: string;
|
|
247
247
|
}
|
|
@@ -265,7 +265,7 @@ interface Workpool {
|
|
|
265
265
|
id: string;
|
|
266
266
|
scheduledFor: number;
|
|
267
267
|
}>;
|
|
268
|
-
/** The pool's name (the `pool
|
|
268
|
+
/** The pool's name (the `pool:<name>` storage key suffix). */
|
|
269
269
|
readonly name: string;
|
|
270
270
|
/** Inspect the pool's current state — `inFlight` slots used and the configured `maxConcurrency`. */
|
|
271
271
|
status: () => Promise<{
|
|
@@ -376,7 +376,7 @@ declare const createScheduler: (options: LunoraSchedulerOptions) => Scheduler;
|
|
|
376
376
|
* `@convex-dev/workpool`. Mirrors `createScheduler`'s `namespace` /
|
|
377
377
|
* `originUrl` / `instanceName` options and is built on the SAME `SchedulerDO`:
|
|
378
378
|
* a workpool is just a NAMED logical pool inside that DO (concurrency counter
|
|
379
|
-
* keyed by {@link WorkpoolOptions.name} under the `pool
|
|
379
|
+
* keyed by {@link WorkpoolOptions.name} under the `pool:<name>` storage key).
|
|
380
380
|
* It needs no extra Durable Object or wrangler binding beyond the SchedulerDO
|
|
381
381
|
* the scheduler already uses.
|
|
382
382
|
*
|
|
@@ -511,20 +511,20 @@ interface CronJobsBuilder {
|
|
|
511
511
|
/**
|
|
512
512
|
* Raw cron expression escape hatch (5- or 6-field, full cron-parser grammar).
|
|
513
513
|
* The target may be a function (`internal.file.fn`) or a durable workflow
|
|
514
|
-
* (`workflows
|
|
514
|
+
* (`workflows.<name>`); a workflow's `args` are inferred from its `params`.
|
|
515
515
|
*/
|
|
516
516
|
cron: <T extends CronTarget>(name: string, cronExpr: string, target: T, args?: CronTargetArgs<T>) => CronJobsBuilder;
|
|
517
|
-
/** Daily at `hourUTC:minuteUTC` (UTC). The target may be a function or a durable workflow (`workflows
|
|
517
|
+
/** Daily at `hourUTC:minuteUTC` (UTC). The target may be a function or a durable workflow (`workflows.<name>`). */
|
|
518
518
|
daily: <T extends CronTarget>(name: string, schedule: DailySchedule, target: T, args?: CronTargetArgs<T>) => CronJobsBuilder;
|
|
519
|
-
/** Hourly at `minuteUTC` past the hour. The target may be a function or a durable workflow (`workflows
|
|
519
|
+
/** Hourly at `minuteUTC` past the hour. The target may be a function or a durable workflow (`workflows.<name>`). */
|
|
520
520
|
hourly: <T extends CronTarget>(name: string, schedule: HourlySchedule, target: T, args?: CronTargetArgs<T>) => CronJobsBuilder;
|
|
521
|
-
/** Every `{ seconds | minutes | hours }`. The target may be a function or a durable workflow (`workflows
|
|
521
|
+
/** Every `{ seconds | minutes | hours }`. The target may be a function or a durable workflow (`workflows.<name>`). */
|
|
522
522
|
interval: <T extends CronTarget>(name: string, schedule: IntervalSchedule, target: T, args?: CronTargetArgs<T>) => CronJobsBuilder;
|
|
523
523
|
/** Snapshot of the registered jobs, in declaration order. */
|
|
524
524
|
jobs: () => ReadonlyArray<CronJob>;
|
|
525
|
-
/** Monthly on `day` at `hourUTC:minuteUTC` (UTC). The target may be a function or a durable workflow (`workflows
|
|
525
|
+
/** Monthly on `day` at `hourUTC:minuteUTC` (UTC). The target may be a function or a durable workflow (`workflows.<name>`). */
|
|
526
526
|
monthly: <T extends CronTarget>(name: string, schedule: MonthlySchedule, target: T, args?: CronTargetArgs<T>) => CronJobsBuilder;
|
|
527
|
-
/** Weekly on `dayOfWeek` at `hourUTC:minuteUTC` (UTC). The target may be a function or a durable workflow (`workflows
|
|
527
|
+
/** Weekly on `dayOfWeek` at `hourUTC:minuteUTC` (UTC). The target may be a function or a durable workflow (`workflows.<name>`). */
|
|
528
528
|
weekly: <T extends CronTarget>(name: string, schedule: WeeklySchedule, target: T, args?: CronTargetArgs<T>) => CronJobsBuilder;
|
|
529
529
|
}
|
|
530
530
|
/**
|
|
@@ -597,7 +597,7 @@ interface SchedulerEnv {
|
|
|
597
597
|
/**
|
|
598
598
|
* Fallback bearer token attached to the dispatch when
|
|
599
599
|
* {@link SchedulerEnv.LUNORA_SCHEDULER_SECRET} is not configured. Sent as
|
|
600
|
-
* `authorization: Bearer
|
|
600
|
+
* `authorization: Bearer <token>`.
|
|
601
601
|
*/
|
|
602
602
|
LUNORA_ADMIN_TOKEN?: string;
|
|
603
603
|
/**
|
|
@@ -624,7 +624,7 @@ interface SchedulerPoolStatus {
|
|
|
624
624
|
inFlight: number;
|
|
625
625
|
/** The pool's concurrency cap. */
|
|
626
626
|
maxConcurrency: number;
|
|
627
|
-
/** The logical workpool name (the `pool
|
|
627
|
+
/** The logical workpool name (the `pool:<name>` suffix). */
|
|
628
628
|
name: string;
|
|
629
629
|
/** Pending jobs routed to this pool but not yet dispatched. */
|
|
630
630
|
queued: number;
|
|
@@ -639,13 +639,13 @@ interface SchedulerStatus {
|
|
|
639
639
|
backlog: number;
|
|
640
640
|
/** Sum of every pool's `inFlight` count — the total held concurrency slots. */
|
|
641
641
|
inFlight: number;
|
|
642
|
-
/** Per-pool backlog breakdown, one entry per `pool
|
|
642
|
+
/** Per-pool backlog breakdown, one entry per `pool:<name>` record. */
|
|
643
643
|
pools: SchedulerPoolStatus[];
|
|
644
644
|
}
|
|
645
645
|
/**
|
|
646
646
|
* Durable Object that stores pending scheduled invocations sorted by their
|
|
647
647
|
* `scheduledFor` time and fires them via HTTP on alarm. Storage layout:
|
|
648
|
-
* `id
|
|
648
|
+
* `id:<id>` maps to {@link ScheduleRecord}; `t:<paddedTime>:<id>` maps to the
|
|
649
649
|
* id (used as a sorted index).
|
|
650
650
|
*
|
|
651
651
|
* On every mutation the DO recomputes the earliest pending task and updates
|
|
@@ -835,7 +835,7 @@ declare class SchedulerDO {
|
|
|
835
835
|
* under a `dead:` key for manual inspection.
|
|
836
836
|
*/
|
|
837
837
|
private recordRetry;
|
|
838
|
-
/** Read the durable `pool
|
|
838
|
+
/** Read the durable `pool:<name>` row, defaulting to a fresh `inFlight: 0` pool. */
|
|
839
839
|
private loadPool;
|
|
840
840
|
private savePool;
|
|
841
841
|
/**
|
|
@@ -857,7 +857,7 @@ declare class SchedulerDO {
|
|
|
857
857
|
private handlePoolStatus;
|
|
858
858
|
/**
|
|
859
859
|
* `GET /status` — the app-level backlog signal that powers the studio's
|
|
860
|
-
* SLO view. Enumerates every durable `pool
|
|
860
|
+
* SLO view. Enumerates every durable `pool:<name>` row for its `inFlight`/
|
|
861
861
|
* `maxConcurrency` semaphore, counts the pending (not-yet-dispatched) jobs
|
|
862
862
|
* routed to each pool with the same single-pass scan {@link handlePoolStatus}
|
|
863
863
|
* uses, and rolls those up into app-wide `backlog` (sum of `queued`) and
|
|
@@ -866,7 +866,7 @@ declare class SchedulerDO {
|
|
|
866
866
|
* Pools that have rows but no queued jobs still appear (with `queued: 0`) so
|
|
867
867
|
* a saturated-but-idle pool stays visible; a pool that only ever existed as
|
|
868
868
|
* queued jobs without a persisted row is unreachable here (the schedule path
|
|
869
|
-
* always writes a `pool
|
|
869
|
+
* always writes a `pool:<name>` row before the job's header), so a single
|
|
870
870
|
* scan over `pool:` plus a cursor loop over `id:` is sufficient.
|
|
871
871
|
*/
|
|
872
872
|
private handleStatus;
|
|
@@ -875,7 +875,7 @@ declare class SchedulerDO {
|
|
|
875
875
|
private handleList;
|
|
876
876
|
/**
|
|
877
877
|
* `GET /dead` — list the dead-letter records: jobs that exhausted their
|
|
878
|
-
* retry budget ({@link recordRetry}) and were parked under `dead
|
|
878
|
+
* retry budget ({@link recordRetry}) and were parked under `dead:<id>`
|
|
879
879
|
* instead of being silently dropped. These never appear in `/list` (their
|
|
880
880
|
* `id:` header is deleted on park), so this is the ONLY way the studio can
|
|
881
881
|
* surface — and recover — a permanently-failed job.
|
|
@@ -896,7 +896,7 @@ declare class SchedulerDO {
|
|
|
896
896
|
*/
|
|
897
897
|
private handleDeadCancel;
|
|
898
898
|
/**
|
|
899
|
-
* Resolve a single pending job by id via a direct `id
|
|
899
|
+
* Resolve a single pending job by id via a direct `id:<id>` storage read —
|
|
900
900
|
* O(1), versus scanning the whole `/list` view. Responds `{ record }` on a
|
|
901
901
|
* hit and `{}` on a miss (an absent `record` field — JSON has no `undefined`
|
|
902
902
|
* — which the client reads back as `null`).
|
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ type ArgsOf<F extends FunctionReference> = F extends {
|
|
|
18
18
|
} ? A : Record<string, unknown>;
|
|
19
19
|
/**
|
|
20
20
|
* Typed reference to a Lunora durable workflow — either the generated
|
|
21
|
-
* `workflows
|
|
21
|
+
* `workflows.<name>` reference object (`_generated/api.ts`, which carries the
|
|
22
22
|
* `WORKFLOW_*` binding + export name) or, structurally, a `defineWorkflow()`
|
|
23
23
|
* result imported directly. Both are matched by the `isLunoraWorkflow` brand and
|
|
24
24
|
* carry the workflow's `params` in the phantom `__params`, so a `cronJobs()`
|
|
@@ -36,7 +36,7 @@ type ArgsOf<F extends FunctionReference> = F extends {
|
|
|
36
36
|
interface WorkflowReference<Params = Record<string, unknown>> {
|
|
37
37
|
/** Phantom carrier for the workflow's `params` type — drives `cronJobs()` arg inference. Never read at runtime. */
|
|
38
38
|
readonly __params?: Params;
|
|
39
|
-
/** The `WORKFLOW_*` binding name (present on a generated `workflows
|
|
39
|
+
/** The `WORKFLOW_*` binding name (present on a generated `workflows.<name>` ref). */
|
|
40
40
|
readonly binding?: string;
|
|
41
41
|
readonly isLunoraWorkflow: true;
|
|
42
42
|
/** The workflow's export/stable name (present on a generated ref; a `defineWorkflow({ name })` override otherwise). */
|
|
@@ -161,8 +161,8 @@ interface Scheduler {
|
|
|
161
161
|
/**
|
|
162
162
|
* Schedule `target` to run once, `delayMs` from now. `target` is a function
|
|
163
163
|
* {@link FunctionReference} (dispatched as a one-shot) or a durable
|
|
164
|
-
* {@link WorkflowReference} — the generated `workflows
|
|
165
|
-
* `agents
|
|
164
|
+
* {@link WorkflowReference} — the generated `workflows.<name>` /
|
|
165
|
+
* `agents.<name>` ref — which starts a fresh instance on fire (args become
|
|
166
166
|
* its `params`). {@link ScheduleTargetArgs} infers the accepted args from
|
|
167
167
|
* whichever target was passed.
|
|
168
168
|
*/
|
|
@@ -241,7 +241,7 @@ interface WorkpoolOptions extends LunoraSchedulerOptions {
|
|
|
241
241
|
maxConcurrency: number;
|
|
242
242
|
/**
|
|
243
243
|
* Pool name — the concurrency counter is keyed by this inside the
|
|
244
|
-
* SchedulerDO storage (`pool
|
|
244
|
+
* SchedulerDO storage (`pool:<name>`). Default `default`.
|
|
245
245
|
*/
|
|
246
246
|
name?: string;
|
|
247
247
|
}
|
|
@@ -265,7 +265,7 @@ interface Workpool {
|
|
|
265
265
|
id: string;
|
|
266
266
|
scheduledFor: number;
|
|
267
267
|
}>;
|
|
268
|
-
/** The pool's name (the `pool
|
|
268
|
+
/** The pool's name (the `pool:<name>` storage key suffix). */
|
|
269
269
|
readonly name: string;
|
|
270
270
|
/** Inspect the pool's current state — `inFlight` slots used and the configured `maxConcurrency`. */
|
|
271
271
|
status: () => Promise<{
|
|
@@ -376,7 +376,7 @@ declare const createScheduler: (options: LunoraSchedulerOptions) => Scheduler;
|
|
|
376
376
|
* `@convex-dev/workpool`. Mirrors `createScheduler`'s `namespace` /
|
|
377
377
|
* `originUrl` / `instanceName` options and is built on the SAME `SchedulerDO`:
|
|
378
378
|
* a workpool is just a NAMED logical pool inside that DO (concurrency counter
|
|
379
|
-
* keyed by {@link WorkpoolOptions.name} under the `pool
|
|
379
|
+
* keyed by {@link WorkpoolOptions.name} under the `pool:<name>` storage key).
|
|
380
380
|
* It needs no extra Durable Object or wrangler binding beyond the SchedulerDO
|
|
381
381
|
* the scheduler already uses.
|
|
382
382
|
*
|
|
@@ -511,20 +511,20 @@ interface CronJobsBuilder {
|
|
|
511
511
|
/**
|
|
512
512
|
* Raw cron expression escape hatch (5- or 6-field, full cron-parser grammar).
|
|
513
513
|
* The target may be a function (`internal.file.fn`) or a durable workflow
|
|
514
|
-
* (`workflows
|
|
514
|
+
* (`workflows.<name>`); a workflow's `args` are inferred from its `params`.
|
|
515
515
|
*/
|
|
516
516
|
cron: <T extends CronTarget>(name: string, cronExpr: string, target: T, args?: CronTargetArgs<T>) => CronJobsBuilder;
|
|
517
|
-
/** Daily at `hourUTC:minuteUTC` (UTC). The target may be a function or a durable workflow (`workflows
|
|
517
|
+
/** Daily at `hourUTC:minuteUTC` (UTC). The target may be a function or a durable workflow (`workflows.<name>`). */
|
|
518
518
|
daily: <T extends CronTarget>(name: string, schedule: DailySchedule, target: T, args?: CronTargetArgs<T>) => CronJobsBuilder;
|
|
519
|
-
/** Hourly at `minuteUTC` past the hour. The target may be a function or a durable workflow (`workflows
|
|
519
|
+
/** Hourly at `minuteUTC` past the hour. The target may be a function or a durable workflow (`workflows.<name>`). */
|
|
520
520
|
hourly: <T extends CronTarget>(name: string, schedule: HourlySchedule, target: T, args?: CronTargetArgs<T>) => CronJobsBuilder;
|
|
521
|
-
/** Every `{ seconds | minutes | hours }`. The target may be a function or a durable workflow (`workflows
|
|
521
|
+
/** Every `{ seconds | minutes | hours }`. The target may be a function or a durable workflow (`workflows.<name>`). */
|
|
522
522
|
interval: <T extends CronTarget>(name: string, schedule: IntervalSchedule, target: T, args?: CronTargetArgs<T>) => CronJobsBuilder;
|
|
523
523
|
/** Snapshot of the registered jobs, in declaration order. */
|
|
524
524
|
jobs: () => ReadonlyArray<CronJob>;
|
|
525
|
-
/** Monthly on `day` at `hourUTC:minuteUTC` (UTC). The target may be a function or a durable workflow (`workflows
|
|
525
|
+
/** Monthly on `day` at `hourUTC:minuteUTC` (UTC). The target may be a function or a durable workflow (`workflows.<name>`). */
|
|
526
526
|
monthly: <T extends CronTarget>(name: string, schedule: MonthlySchedule, target: T, args?: CronTargetArgs<T>) => CronJobsBuilder;
|
|
527
|
-
/** Weekly on `dayOfWeek` at `hourUTC:minuteUTC` (UTC). The target may be a function or a durable workflow (`workflows
|
|
527
|
+
/** Weekly on `dayOfWeek` at `hourUTC:minuteUTC` (UTC). The target may be a function or a durable workflow (`workflows.<name>`). */
|
|
528
528
|
weekly: <T extends CronTarget>(name: string, schedule: WeeklySchedule, target: T, args?: CronTargetArgs<T>) => CronJobsBuilder;
|
|
529
529
|
}
|
|
530
530
|
/**
|
|
@@ -597,7 +597,7 @@ interface SchedulerEnv {
|
|
|
597
597
|
/**
|
|
598
598
|
* Fallback bearer token attached to the dispatch when
|
|
599
599
|
* {@link SchedulerEnv.LUNORA_SCHEDULER_SECRET} is not configured. Sent as
|
|
600
|
-
* `authorization: Bearer
|
|
600
|
+
* `authorization: Bearer <token>`.
|
|
601
601
|
*/
|
|
602
602
|
LUNORA_ADMIN_TOKEN?: string;
|
|
603
603
|
/**
|
|
@@ -624,7 +624,7 @@ interface SchedulerPoolStatus {
|
|
|
624
624
|
inFlight: number;
|
|
625
625
|
/** The pool's concurrency cap. */
|
|
626
626
|
maxConcurrency: number;
|
|
627
|
-
/** The logical workpool name (the `pool
|
|
627
|
+
/** The logical workpool name (the `pool:<name>` suffix). */
|
|
628
628
|
name: string;
|
|
629
629
|
/** Pending jobs routed to this pool but not yet dispatched. */
|
|
630
630
|
queued: number;
|
|
@@ -639,13 +639,13 @@ interface SchedulerStatus {
|
|
|
639
639
|
backlog: number;
|
|
640
640
|
/** Sum of every pool's `inFlight` count — the total held concurrency slots. */
|
|
641
641
|
inFlight: number;
|
|
642
|
-
/** Per-pool backlog breakdown, one entry per `pool
|
|
642
|
+
/** Per-pool backlog breakdown, one entry per `pool:<name>` record. */
|
|
643
643
|
pools: SchedulerPoolStatus[];
|
|
644
644
|
}
|
|
645
645
|
/**
|
|
646
646
|
* Durable Object that stores pending scheduled invocations sorted by their
|
|
647
647
|
* `scheduledFor` time and fires them via HTTP on alarm. Storage layout:
|
|
648
|
-
* `id
|
|
648
|
+
* `id:<id>` maps to {@link ScheduleRecord}; `t:<paddedTime>:<id>` maps to the
|
|
649
649
|
* id (used as a sorted index).
|
|
650
650
|
*
|
|
651
651
|
* On every mutation the DO recomputes the earliest pending task and updates
|
|
@@ -835,7 +835,7 @@ declare class SchedulerDO {
|
|
|
835
835
|
* under a `dead:` key for manual inspection.
|
|
836
836
|
*/
|
|
837
837
|
private recordRetry;
|
|
838
|
-
/** Read the durable `pool
|
|
838
|
+
/** Read the durable `pool:<name>` row, defaulting to a fresh `inFlight: 0` pool. */
|
|
839
839
|
private loadPool;
|
|
840
840
|
private savePool;
|
|
841
841
|
/**
|
|
@@ -857,7 +857,7 @@ declare class SchedulerDO {
|
|
|
857
857
|
private handlePoolStatus;
|
|
858
858
|
/**
|
|
859
859
|
* `GET /status` — the app-level backlog signal that powers the studio's
|
|
860
|
-
* SLO view. Enumerates every durable `pool
|
|
860
|
+
* SLO view. Enumerates every durable `pool:<name>` row for its `inFlight`/
|
|
861
861
|
* `maxConcurrency` semaphore, counts the pending (not-yet-dispatched) jobs
|
|
862
862
|
* routed to each pool with the same single-pass scan {@link handlePoolStatus}
|
|
863
863
|
* uses, and rolls those up into app-wide `backlog` (sum of `queued`) and
|
|
@@ -866,7 +866,7 @@ declare class SchedulerDO {
|
|
|
866
866
|
* Pools that have rows but no queued jobs still appear (with `queued: 0`) so
|
|
867
867
|
* a saturated-but-idle pool stays visible; a pool that only ever existed as
|
|
868
868
|
* queued jobs without a persisted row is unreachable here (the schedule path
|
|
869
|
-
* always writes a `pool
|
|
869
|
+
* always writes a `pool:<name>` row before the job's header), so a single
|
|
870
870
|
* scan over `pool:` plus a cursor loop over `id:` is sufficient.
|
|
871
871
|
*/
|
|
872
872
|
private handleStatus;
|
|
@@ -875,7 +875,7 @@ declare class SchedulerDO {
|
|
|
875
875
|
private handleList;
|
|
876
876
|
/**
|
|
877
877
|
* `GET /dead` — list the dead-letter records: jobs that exhausted their
|
|
878
|
-
* retry budget ({@link recordRetry}) and were parked under `dead
|
|
878
|
+
* retry budget ({@link recordRetry}) and were parked under `dead:<id>`
|
|
879
879
|
* instead of being silently dropped. These never appear in `/list` (their
|
|
880
880
|
* `id:` header is deleted on park), so this is the ONLY way the studio can
|
|
881
881
|
* surface — and recover — a permanently-failed job.
|
|
@@ -896,7 +896,7 @@ declare class SchedulerDO {
|
|
|
896
896
|
*/
|
|
897
897
|
private handleDeadCancel;
|
|
898
898
|
/**
|
|
899
|
-
* Resolve a single pending job by id via a direct `id
|
|
899
|
+
* Resolve a single pending job by id via a direct `id:<id>` storage read —
|
|
900
900
|
* O(1), versus scanning the whole `/list` view. Responds `{ record }` on a
|
|
901
901
|
* hit and `{}` on a miss (an absent `record` field — JSON has no `undefined`
|
|
902
902
|
* — which the client reads back as `null`).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/scheduler",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.21",
|
|
4
4
|
"description": "Scheduling for Lunora: runAfter / runAt and Cron Triggers via SchedulerDO",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@lunora/errors": "1.0.0-alpha.
|
|
50
|
-
"@lunora/platform": "1.0.0-alpha.
|
|
49
|
+
"@lunora/errors": "1.0.0-alpha.14",
|
|
50
|
+
"@lunora/platform": "1.0.0-alpha.6",
|
|
51
51
|
"cron-parser": "5.6.2"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|