@shivaedev/jobs 0.35.0 → 0.36.0
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/CHANGELOG.md +20 -0
- package/README.md +3 -83
- package/dist/server/adapters/inspectionChanges.d.ts.map +1 -1
- package/dist/server/adapters/inspectionChanges.js +17 -2
- package/dist/server/adapters/inspectionChanges.js.map +1 -1
- package/dist/server/adapters/localInspectionChanges.d.ts +3 -0
- package/dist/server/adapters/localInspectionChanges.d.ts.map +1 -0
- package/dist/server/adapters/localInspectionChanges.js +2 -0
- package/dist/server/adapters/localInspectionChanges.js.map +1 -0
- package/dist/server/adapters/settleDeferral.d.ts.map +1 -1
- package/dist/server/adapters/settleDeferral.js +4 -2
- package/dist/server/adapters/settleDeferral.js.map +1 -1
- package/dist/server/error.d.ts +1 -20
- package/dist/server/error.d.ts.map +1 -1
- package/dist/server/error.js +1 -8
- package/dist/server/error.js.map +1 -1
- package/dist/server/internal/engine.d.ts +1 -6
- package/dist/server/internal/engine.d.ts.map +1 -1
- package/dist/server/internal/engine.js +0 -2
- package/dist/server/internal/engine.js.map +1 -1
- package/package.json +11 -11
- package/src/server/adapters/inspectionChanges.ts +17 -2
- package/src/server/adapters/localInspectionChanges.ts +3 -0
- package/src/server/adapters/settleDeferral.ts +4 -2
- package/src/server/error.ts +1 -17
- package/src/server/internal/engine.ts +1 -8
- package/dist/server/adapters/expireAttempt.d.ts +0 -4
- package/dist/server/adapters/expireAttempt.d.ts.map +0 -1
- package/dist/server/adapters/expireAttempt.js +0 -17
- package/dist/server/adapters/expireAttempt.js.map +0 -1
- package/dist/server/adapters/testingClient.d.ts +0 -13
- package/dist/server/adapters/testingClient.d.ts.map +0 -1
- package/dist/server/adapters/testingClient.js +0 -101
- package/dist/server/adapters/testingClient.js.map +0 -1
- package/dist/server/adapters/testingController.d.ts +0 -80
- package/dist/server/adapters/testingController.d.ts.map +0 -1
- package/dist/server/adapters/testingController.js +0 -120
- package/dist/server/adapters/testingController.js.map +0 -1
- package/dist/server/adapters/testingDueNow.d.ts +0 -7
- package/dist/server/adapters/testingDueNow.d.ts.map +0 -1
- package/dist/server/adapters/testingDueNow.js +0 -26
- package/dist/server/adapters/testingDueNow.js.map +0 -1
- package/dist/server/adapters/testingEngine.d.ts +0 -5
- package/dist/server/adapters/testingEngine.d.ts.map +0 -1
- package/dist/server/adapters/testingEngine.js +0 -12
- package/dist/server/adapters/testingEngine.js.map +0 -1
- package/dist/server/adapters/testingExpirations.d.ts +0 -8
- package/dist/server/adapters/testingExpirations.d.ts.map +0 -1
- package/dist/server/adapters/testingExpirations.js +0 -27
- package/dist/server/adapters/testingExpirations.js.map +0 -1
- package/dist/server/adapters/testingInspectionClient.d.ts +0 -5
- package/dist/server/adapters/testingInspectionClient.d.ts.map +0 -1
- package/dist/server/adapters/testingInspectionClient.js +0 -52
- package/dist/server/adapters/testingInspectionClient.js.map +0 -1
- package/dist/server/adapters/testingTime.d.ts +0 -10
- package/dist/server/adapters/testingTime.d.ts.map +0 -1
- package/dist/server/adapters/testingTime.js +0 -18
- package/dist/server/adapters/testingTime.js.map +0 -1
- package/dist/server/internal/adapters/deferralChanges.d.ts +0 -3
- package/dist/server/internal/adapters/deferralChanges.d.ts.map +0 -1
- package/dist/server/internal/adapters/deferralChanges.js +0 -2
- package/dist/server/internal/adapters/deferralChanges.js.map +0 -1
- package/dist/server/internal/adapters/testingFetches.d.ts +0 -7
- package/dist/server/internal/adapters/testingFetches.d.ts.map +0 -1
- package/dist/server/internal/adapters/testingFetches.js +0 -30
- package/dist/server/internal/adapters/testingFetches.js.map +0 -1
- package/dist/server/internal/testingIdle.d.ts +0 -17
- package/dist/server/internal/testingIdle.d.ts.map +0 -1
- package/dist/server/internal/testingIdle.js +0 -18
- package/dist/server/internal/testingIdle.js.map +0 -1
- package/dist/server/internal/testingOperation.d.ts +0 -5
- package/dist/server/internal/testingOperation.d.ts.map +0 -1
- package/dist/server/internal/testingOperation.js +0 -12
- package/dist/server/internal/testingOperation.js.map +0 -1
- package/dist/server/internal/testingSchedules.d.ts +0 -14
- package/dist/server/internal/testingSchedules.d.ts.map +0 -1
- package/dist/server/internal/testingSchedules.js +0 -20
- package/dist/server/internal/testingSchedules.js.map +0 -1
- package/dist/server/internal/testingWaits.d.ts +0 -20
- package/dist/server/internal/testingWaits.d.ts.map +0 -1
- package/dist/server/internal/testingWaits.js +0 -53
- package/dist/server/internal/testingWaits.js.map +0 -1
- package/dist/server/testing.d.ts +0 -89
- package/dist/server/testing.d.ts.map +0 -1
- package/dist/server/testing.js +0 -12
- package/dist/server/testing.js.map +0 -1
- package/src/server/adapters/expireAttempt.ts +0 -22
- package/src/server/adapters/testingClient.ts +0 -123
- package/src/server/adapters/testingController.ts +0 -137
- package/src/server/adapters/testingDueNow.ts +0 -32
- package/src/server/adapters/testingEngine.ts +0 -15
- package/src/server/adapters/testingExpirations.ts +0 -33
- package/src/server/adapters/testingInspectionClient.ts +0 -70
- package/src/server/adapters/testingTime.ts +0 -25
- package/src/server/internal/adapters/deferralChanges.ts +0 -3
- package/src/server/internal/adapters/testingFetches.ts +0 -36
- package/src/server/internal/testingIdle.ts +0 -36
- package/src/server/internal/testingOperation.ts +0 -18
- package/src/server/internal/testingSchedules.ts +0 -35
- package/src/server/internal/testingWaits.ts +0 -94
- package/src/server/testing.ts +0 -31
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.36.0 - 2026-11-04
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Advance inspection change revisions immediately after local deferral settlement, before workers continue their batch.
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Require Effect 4.0.7 and its matching companion packages. Install the 4.0.7 Effect stack together.
|
|
12
|
+
|
|
13
|
+
### Breaking
|
|
14
|
+
|
|
15
|
+
- Move `makePgBossTesting`, `testRetryPolicy`, `linkedWorkerSpans` and their types from `@shivaedev/jobs/server/testing.ts` to `@shivaedev/test-kits/jobs/testing.ts`. Import `PgBossTestingError` and `PgBossWaitError` from `@shivaedev/test-kits/jobs/error.ts` instead of jobs’ error module. Add test-kits as a development dependency; jobs no longer exports testing infrastructure.
|
|
16
|
+
|
|
17
|
+
## 0.35.1 - 2026-11-04
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- Update `@shivaedev/sql` from 0.37.0 to 0.38.0.
|
|
22
|
+
|
|
3
23
|
## 0.35.0 - 2026-11-04
|
|
4
24
|
|
|
5
25
|
### Breaking
|
package/README.md
CHANGED
|
@@ -426,7 +426,7 @@ export const readJobCounts = Effect.gen(function* () {
|
|
|
426
426
|
|
|
427
427
|
`storedJobs(queue, options?)` reads native stored metadata and encoded payloads. `jobs(queue, options?)` decodes stored payloads through the supplied queue Schema and includes native state, `startAfter`, `expireInSeconds`, `startedOn` and `keepUntil`. These reads include unredacted payloads; keep them inside trusted server code. The admin-facing `getJob`, `failedJobs` and `deadLetteredJobs` reads retain their payload redaction. `deferred(queue)` reads stored RetryAt reasons and requested times, while `snapshot(queues)` lists unfinished work with future RetryAt attempts marked `deferred`. `counts`, `health`, `queue`, `schedules`, `schemaVersion` and `busy` serve queue diagnostics and controller readouts.
|
|
428
428
|
|
|
429
|
-
`changes(queue?)` acquires a scoped PostgreSQL listener and returns `revision` and `waitForChange(after)`. Capture its revision before reading, then wait against that revision to avoid missing a change between the read and the wait. The signal wakes for committed job changes from any client, optionally filtered to one queue. It is a hint to read again, not a durable event log. The caller owns the listener's scope.
|
|
429
|
+
`changes(queue?)` acquires a scoped PostgreSQL listener and returns `revision` and `waitForChange(after)`. Capture its revision before reading, then wait against that revision to avoid missing a change between the read and the wait. The signal wakes for committed job changes from any client, optionally filtered to one queue. Local deferrals advance the revision before the worker continues its batch, without waiting for PostgreSQL notifications. It is a hint to read again, not a durable event log. The caller owns the listener's scope.
|
|
430
430
|
|
|
431
431
|
Automatic migration and `installPgBossSchema` install the queue-change trigger. Applications using `migrate: false` run `installPgBossSchema` before using change signals. Custom clients need `getDb().listen` to subscribe.
|
|
432
432
|
|
|
@@ -553,86 +553,7 @@ Include every target queue in `jobs`, as either a worker or a producer-only defi
|
|
|
553
553
|
|
|
554
554
|
### Test through the queue contract
|
|
555
555
|
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
`testing.ts` gives story kits a controller for one real pg-boss client. Create a fresh controller per runtime, pass its `clientFactory` to `pgBossLayer`, and keep that Layer scoped as usual. `jobs(queue, options?)` returns jobs-owned `Job` metadata with `data` decoded through the queue's Schema, including traced payloads. For a scheduled run with no payload, pass `{ name: Cleanup.name, schema: Schema.Null }` to read `data: null`. Invalid durable data fails with `PgBossPayloadError`; decoding services remain in the Effect's requirements.
|
|
559
|
-
|
|
560
|
-
This producer story uses the `SendEmail` definition and `Jobs` service from above. `databaseUrl` points to the story's PostgreSQL database:
|
|
561
|
-
|
|
562
|
-
```ts
|
|
563
|
-
import { Context, Effect, Layer, Option } from "effect";
|
|
564
|
-
import { TestClock } from "effect/testing";
|
|
565
|
-
import { expect } from "vitest";
|
|
566
|
-
import { storyKit } from "@shivaedev/test-story/server/storyKit.ts";
|
|
567
|
-
import { pgBossLayer } from "@shivaedev/jobs/server/service.ts";
|
|
568
|
-
import { makePgBossTesting, testRetryPolicy } from "@shivaedev/jobs/server/testing.ts";
|
|
569
|
-
|
|
570
|
-
const emailStories = storyKit({
|
|
571
|
-
clock: "test",
|
|
572
|
-
*create() {
|
|
573
|
-
const testing = makePgBossTesting({ clock: yield* TestClock.testClockWith(Effect.succeed), retryPolicy: testRetryPolicy });
|
|
574
|
-
const context = yield* Layer.build(
|
|
575
|
-
Jobs.layer({ jobs: [SendEmail] }).pipe(Layer.provide(pgBossLayer({ connectionString: databaseUrl, clientFactory: testing.clientFactory }))),
|
|
576
|
-
);
|
|
577
|
-
return { jobs: Context.get(context, Jobs), testing };
|
|
578
|
-
},
|
|
579
|
-
name: "queued email",
|
|
580
|
-
stages: ["ready"],
|
|
581
|
-
verbs: ({ jobs, testing }) => ({
|
|
582
|
-
enqueue: (userId: number) => jobs.enqueue(SendEmail, { userId }),
|
|
583
|
-
testing,
|
|
584
|
-
}),
|
|
585
|
-
});
|
|
586
|
-
|
|
587
|
-
emailStories.it("decodes the queued email", [], function* ({ enqueue, testing }) {
|
|
588
|
-
const id = Option.getOrThrow(yield* enqueue(42));
|
|
589
|
-
expect(yield* testing.jobs(SendEmail)).toMatchObject([{ id, data: { userId: 42 }, state: "created" }]);
|
|
590
|
-
});
|
|
591
|
-
```
|
|
592
|
-
|
|
593
|
-
Set `retryPolicy: testRetryPolicy` through the controller to override queue and send settings with `retryDelay: 0` and `retryBackoff: false`. A failing worker can then exhaust its native retries without production backoff. The policy applies to subsequently sent jobs; it does not rewrite jobs already stored.
|
|
594
|
-
|
|
595
|
-
To pass time, use the controller's `timePasses` verb with the same native story `TestClock`:
|
|
596
|
-
|
|
597
|
-
```ts
|
|
598
|
-
import { Effect } from "effect";
|
|
599
|
-
import { TestClock } from "effect/testing";
|
|
600
|
-
import { makePgBossTesting } from "@shivaedev/jobs/server/testing.ts";
|
|
601
|
-
|
|
602
|
-
const testing = makePgBossTesting({ clock: yield* TestClock.testClockWith(Effect.succeed) });
|
|
603
|
-
yield* testing.timePasses("1 day");
|
|
604
|
-
```
|
|
605
|
-
|
|
606
|
-
The controller advances the application clock and pg-boss's PostgreSQL clock together, wakes due workers and waits for their settlement. A `RetryAt` later than the new time remains deferred. Provide `testing.clientFactory` to the jobs Layer as above, and use an isolated database for each story. Passing time first waits for existing work to settle; release a held handler before advancing this controller. Supply the story clock so both the application and pg-boss stay under the kit's control.
|
|
607
|
-
|
|
608
|
-
`schedules()` lists registered schedules as `{ name, cron, timezone }` entries from PostgreSQL. `trigger(schedule)` takes a schedule definition, such as `Cleanup`, and enqueues one run now using its stored schedule data and options. It returns the run ID, or null when pg-boss suppresses the send. Register `Cleanup.run(effect)` in the testing Layer first, then yield `testing.trigger(Cleanup)` and `testing.waitForIdle` before observing the Effect's result. An unregistered schedule fails with `PgBossTestingError` (`operation: "trigger"`).
|
|
609
|
-
|
|
610
|
-
`refreshQueueStats(queue?)` requests a native pg-boss supervisor pass for one queue, or all queues when omitted, before reading cached counts through the jobs service's `health`. Like the service method, it performs native queue maintenance and respects pg-boss monitor intervals and backoff.
|
|
611
|
-
|
|
612
|
-
`failNextSend(queue)` arms one send failure for that queue. The next valid `enqueue` fails with the usual typed `PgBossError` (`operation: "enqueue"`); the following send proceeds normally.
|
|
613
|
-
|
|
614
|
-
`expireAfter(queue, n)` takes a positive attempt count: configure it before enqueueing to limit subsequent jobs to `n` attempts. Each successful send keeps its own expiry rule; later changes and duplicate-ID sends do not alter pending jobs. Earlier attempts run the handler normally; on attempt `n`, the controller expires the claimed job instead of invoking its handler. PostgreSQL supervision performs the terminal failure and dead lettering. A job that succeeds earlier completes normally.
|
|
615
|
-
|
|
616
|
-
`expireIn(queue, duration)` takes an Effect `Duration.Input`, such as `"1 second"`, and sets the expiry of subsequent sends, rounded up to whole seconds. Durations below one second or nonfinite durations fail with `PgBossTestingError` (`operation: "expireIn"`). Earlier sends retain their expiry, and later calls and duplicate-ID sends do not change stored jobs. Both expiry controls also apply to runs sent by `trigger(schedule)`. It can be combined with `expireAfter`: one sets each attempt's time budget, the other limits attempts. A stuck handler is interrupted at its deadline, and the same worker can fetch its retry after pg-boss fails the attempt. The testing expiry hooks support pg-boss schema version 46.
|
|
617
|
-
|
|
618
|
-
`runDueNow(queue)` makes future jobs in the queue's `created` or `retry` state due at the database's current time and wakes local workers. It includes delayed sends (`startAfter`), native retries and `RetryAt` deferrals. Yield `waitForIdle` afterwards before observing handler results; future jobs do not hold that wait open. It leaves active and terminal jobs and other queues unchanged.
|
|
619
|
-
|
|
620
|
-
`deferred(queue)` returns waiting deferrals as `{ at: DateTime.Utc, reason: string }[]`. `runDeferredNow(queue)` pulls those jobs forward to the database’s current time and wakes local workers without waiting for their original due time. Read `revision` before reading deferrals and use `waitForChange(revision)` as with other controls.
|
|
621
|
-
|
|
622
|
-
`checkBatchWindow(queue, millisecondsPerJob)` checks that the declared sequential batch fits strictly inside the stored queue expiry window. `schemaVersion` reads the installed version, and `checkSchemaVersion(expected)` fails when it differs. Test control, read and check failures use `PgBossTestingError` with `operation`, optional `queue` and a redacted `original`.
|
|
623
|
-
|
|
624
|
-
`snapshot(queues)` reads the unfinished jobs of several queues in one query, so the result is one consistent PostgreSQL snapshot. It returns jobs in the `created`, `retry`, `active` and `failed` states, never completed ones, oldest first by creation. A waiting `RetryAt` job reads as `deferred` while its `startAfter` is in the future; once due, it reads as `retry` until claimed. A retry after a handler failure reads as `retry` even when its next attempt is in the future. Each entry has the job's `id`, `queue` (the definition's name), `state`, `startAfter` as a UTC `DateTime` and `data` decoded by that queue's Schema. Only unfinished rows are decoded, so a completed job whose stored data the Schema no longer accepts does not fail the read; invalid unfinished data fails with `PgBossPayloadError`.
|
|
625
|
-
|
|
626
|
-
`waitForIdle` discovers queues from the jobs registered in the controller's Layer, including producer-only definitions and schedules; it takes no queue list. It completes when none of those queues has an active job or an unblocked job ready to fetch, including work claimed by another client. Ready jobs keep the wait open even when no local worker runs them. A terminal native worker timeout lets the wait complete after pg-boss fails the job. Jobs whose `startAfter` is in the future do not hold the wait open. While a local fetched batch has no settlement yet, the wait reads nothing and waits for the next local change; otherwise it checks PostgreSQL on local changes and committed job-change notifications from other clients. A kit settles by yielding `waitForIdle` and then reading jobs once. As with any idle snapshot, a producer can enqueue more work after the wait returns.
|
|
627
|
-
|
|
628
|
-
A kit can also capture `revision` before reading jobs and yield `waitForChange(revision)` when its condition is unmet. The wait resumes after a local send, settlement or worker fetch, and when a local worker returns to idle as `waitForIdle` defines it, including terminal native worker timeouts. It also resumes immediately if a change occurred between the read and the wait. This signal observes the controller's client; external clients, future scheduled work and external database writes need their own wake source. Stories should retain a bounded test timeout.
|
|
629
|
-
|
|
630
|
-
`untilJob(queue, id, state)` waits that way for one job: it reads the job, waits for the next change when the job is in another state, and returns the job with `data` decoded through the queue's Schema once it reaches `state`. It also accepts `{ name, schema: Schema.Null }` for a triggered schedule's run. `fetchesPass(queue, n)` completes once `n` worker fetches on the queue that began after the wait started have finished, whether or not they claimed anything, so a story can show that a job stayed untaken by fetches that could have claimed it. Each fetch also counts as a change for `waitForChange`. Both waits give up after `within` (default 20 seconds) on the caller's Effect clock, so a story forks the wait and advances its `TestClock` to exercise a timeout, and fail with `PgBossWaitError`, whose message names what the wait expected and what it last saw:
|
|
631
|
-
|
|
632
|
-
```ts
|
|
633
|
-
yield* testing.untilJob(SendEmail, id, "completed", { within: "5 seconds" });
|
|
634
|
-
// Gave up after 5s waiting until job <id> in send-email is completed; last seen: retry
|
|
635
|
-
```
|
|
556
|
+
Use the controller from [test-kits](https://github.com/ShivaeDev/platform/tree/main/packages/test-kits#jobs) in your application story kit.
|
|
636
557
|
|
|
637
558
|
### API
|
|
638
559
|
|
|
@@ -646,7 +567,7 @@ Import the module that defines the name; the package has no root entry.
|
|
|
646
567
|
| `@shivaedev/jobs/server/PgBoss.ts` | `PgBoss`: the shared client Context service. |
|
|
647
568
|
| `@shivaedev/jobs/server/schema.ts` | `installPgBossSchema`, `pgBossSchema`; `PgBossSchemaOptions` |
|
|
648
569
|
| `@shivaedev/jobs/server/health.ts` | `deadLetterQueueName`; `DeadLetteredJob`, `JobPage`, `JobPageOptions`, `JobsHealth`, `ListedJob`, `QueueCounts`, `QueueHealth` |
|
|
649
|
-
| `@shivaedev/jobs/server/error.ts` | `PgBossError`, `PgBossNotFoundError`, `PgBossPayloadError`, `PgBossQueueNamesError`, `PgBossQueueOptionsError`, `PgBossClientOptionsError`, `
|
|
570
|
+
| `@shivaedev/jobs/server/error.ts` | `PgBossError`, `PgBossNotFoundError`, `PgBossPayloadError`, `PgBossQueueNamesError`, `PgBossQueueOptionsError`, `PgBossClientOptionsError`, `toPgBossError`; `PgBossOperation` |
|
|
650
571
|
| `@shivaedev/jobs/server/queueOptions.ts` | `QueueOptions`, `QueuePolicy`, `RetryOptions` |
|
|
651
572
|
| `@shivaedev/jobs/server/workerOptions.ts` | `WorkerOptions`, `GroupConcurrencyConfig` |
|
|
652
573
|
| `@shivaedev/jobs/server/enqueueOptions.ts` | `EnqueueOptions`, `QueueEnqueueOptions`, `ScheduleOptions` |
|
|
@@ -656,7 +577,6 @@ Import the module that defines the name; the package has no root entry.
|
|
|
656
577
|
| `@shivaedev/jobs/server/engineClient.ts` | `EngineClient`, `EngineSchedule` |
|
|
657
578
|
| `@shivaedev/jobs/server/client.ts` | `PgBossClient`, `PgBossClientFactory` |
|
|
658
579
|
| `@shivaedev/jobs/server/inspection.ts` | `PgBossInspection`; `PgBossInspectionService` |
|
|
659
|
-
| `@shivaedev/jobs/server/testing.ts` | `makePgBossTesting`, `testRetryPolicy`; `PgBossTesting`, `PgBossTestingOptions`, `PgBossTestingWaitOptions` |
|
|
660
580
|
| `@shivaedev/jobs/server/defineSchedule.ts` | `defineSchedule` |
|
|
661
581
|
| `@shivaedev/jobs/server/adapters/defaultClientFactory.ts` | `defaultClientFactory` |
|
|
662
582
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspectionChanges.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/inspectionChanges.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"inspectionChanges.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/inspectionChanges.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAKtD,eAAO,MAAM,iBAAiB;;;wEAsC5B,CAAC"}
|
|
@@ -1,21 +1,36 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
2
|
import { inspectionChannel } from "#server/adapters/inspectionPlan.ts";
|
|
3
3
|
import { toPgBossError } from "#server/error.ts";
|
|
4
|
+
import { localInspectionChanges } from "./localInspectionChanges.js";
|
|
4
5
|
import { queueSignal } from "./queueSignal.js";
|
|
5
6
|
export const inspectionChanges = Effect.fnUntraced(function* (client, schema, queue) {
|
|
6
7
|
const signal = queueSignal();
|
|
7
8
|
yield* Effect.acquireRelease(Effect.tryPromise({
|
|
8
9
|
catch: (error) => toPgBossError("inspect", error, queue),
|
|
9
|
-
try: () => {
|
|
10
|
+
try: async () => {
|
|
10
11
|
const db = client.getDb?.();
|
|
11
12
|
if (db?.listen === undefined) {
|
|
12
13
|
throw new TypeError("This pg-boss client does not support listen");
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
+
const listener = await db.listen(inspectionChannel(schema), (name) => {
|
|
15
16
|
if (queue === undefined || name === queue) {
|
|
16
17
|
signal.changed();
|
|
17
18
|
}
|
|
18
19
|
}, signal.changed);
|
|
20
|
+
const local = localInspectionChanges.get(db) ?? new Set();
|
|
21
|
+
localInspectionChanges.set(db, local);
|
|
22
|
+
function changed(changedSchema, name) {
|
|
23
|
+
if (changedSchema === schema && (queue === undefined || name === queue)) {
|
|
24
|
+
signal.changed();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
local.add(changed);
|
|
28
|
+
return {
|
|
29
|
+
close: async () => {
|
|
30
|
+
local.delete(changed);
|
|
31
|
+
await listener.close();
|
|
32
|
+
},
|
|
33
|
+
};
|
|
19
34
|
},
|
|
20
35
|
}), (listener) => Effect.promise(() => listener.close()));
|
|
21
36
|
return { revision: signal.revision, waitForChange: signal.waitForChange };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspectionChanges.js","sourceRoot":"","sources":["../../../src/server/adapters/inspectionChanges.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM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AC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localInspectionChanges.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/localInspectionChanges.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhE,eAAO,MAAM,sBAAsB,uCAA4C,MAAM,SAAS,MAAM,KAAK,IAAI,EAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localInspectionChanges.js","sourceRoot":"","sources":["../../../src/server/adapters/localInspectionChanges.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,OAAO,EAAgE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settleDeferral.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/settleDeferral.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"settleDeferral.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/settleDeferral.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAM7D,wBAAsB,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;;;GAoD3I"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { deferralChanges } from "#server/internal/adapters/deferralChanges.ts";
|
|
3
2
|
import { STATELY_DEFERRAL_POLICY } from "#server/internal/deferral.ts";
|
|
4
3
|
import { quotedSchema } from "#server/internal/storedRows.ts";
|
|
4
|
+
import { localInspectionChanges } from "./localInspectionChanges.js";
|
|
5
5
|
const Settlement = Schema.Struct({ claimed: Schema.Boolean, deferred: Schema.Boolean });
|
|
6
6
|
export async function settleDeferral(client, schema, job, at, reason, maxDeferrals) {
|
|
7
7
|
if (client.getDb === undefined) {
|
|
@@ -47,7 +47,9 @@ export async function settleDeferral(client, schema, job, at, reason, maxDeferra
|
|
|
47
47
|
SELECT EXISTS (SELECT 1 FROM claimed) AS claimed, EXISTS (SELECT 1 FROM deferred) AS deferred`, [job.name, job.id, job.retryCount, at, reason, Reflect.get(job, "startedOn"), maxDeferrals]);
|
|
48
48
|
const settled = Schema.decodeUnknownSync(Settlement)(rows[0]);
|
|
49
49
|
if (settled.deferred) {
|
|
50
|
-
|
|
50
|
+
for (const changed of localInspectionChanges.get(db) ?? []) {
|
|
51
|
+
changed(schema, job.name);
|
|
52
|
+
}
|
|
51
53
|
}
|
|
52
54
|
return settled;
|
|
53
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settleDeferral.js","sourceRoot":"","sources":["../../../src/server/adapters/settleDeferral.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"settleDeferral.js","sourceRoot":"","sources":["../../../src/server/adapters/settleDeferral.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;AAExF,MAAM,CAAC,KAAK,U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etteredJobs" | "deleteQueue" | "enqueue" | "failedJobs" | "getJob" | "health" | "install" | "inspect" | "register" | "refreshQueueStats" | "retry" | "settle" | "start" | "stop" | "unschedule";
|
|
3
3
|
declare const PgBossNotFoundError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Cause.YieldableError & {
|
|
4
4
|
readonly _tag: "PgBossNotFoundError";
|
|
@@ -56,25 +56,6 @@ export declare class PgBossPayloadError extends PgBossPayloadError_base<{
|
|
|
56
56
|
readonly original: Redacted.Redacted<unknown>;
|
|
57
57
|
}> {
|
|
58
58
|
}
|
|
59
|
-
declare const PgBossTestingError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Cause.YieldableError & {
|
|
60
|
-
readonly _tag: "PgBossTestingError";
|
|
61
|
-
} & Readonly<A>;
|
|
62
|
-
export declare class PgBossTestingError extends PgBossTestingError_base<{
|
|
63
|
-
readonly operation: string;
|
|
64
|
-
readonly original: Redacted.Redacted<unknown>;
|
|
65
|
-
readonly queue?: string | undefined;
|
|
66
|
-
}> {
|
|
67
|
-
}
|
|
68
|
-
declare const PgBossWaitError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Cause.YieldableError & {
|
|
69
|
-
readonly _tag: "PgBossWaitError";
|
|
70
|
-
} & Readonly<A>;
|
|
71
|
-
export declare class PgBossWaitError extends PgBossWaitError_base<{
|
|
72
|
-
readonly lastSeen: string;
|
|
73
|
-
readonly waitingFor: string;
|
|
74
|
-
readonly within: Duration.Duration;
|
|
75
|
-
}> {
|
|
76
|
-
get message(): string;
|
|
77
|
-
}
|
|
78
59
|
export declare function toPgBossError(operation: PgBossOperation, error: unknown, queue?: string): PgBossError;
|
|
79
60
|
export {};
|
|
80
61
|
//# sourceMappingURL=error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/server/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAQ,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/server/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAQ,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAG/C,MAAM,MAAM,eAAe,GACxB,QAAQ,GACR,kBAAkB,GAClB,aAAa,GACb,SAAS,GACT,YAAY,GACZ,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,SAAS,GACT,UAAU,GACV,mBAAmB,GACnB,OAAO,GACP,QAAQ,GACR,OAAO,GACP,MAAM,GACN,YAAY,CAAC;;;;AAEhB,qBAAa,mBAAoB,SAAQ,yBAAwC;IAChF,QAAQ,CAAC,SAAS,EAAE,aAAa,GAAG,YAAY,CAAC;IACjD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;IACD,IAAa,OAAO,IAAI,MAAM,CAI7B;CACD;;;;AAED,qBAAa,WAAY,SAAQ,iBAAgC;IAChE,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;IACpC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;CAC9C,CAAC;IAED,IAAa,OAAO,IAAI,MAAM,CAK7B;CACD;;;;AAUD,qBAAa,uBAAwB,SAAQ,6BAA4C;IACxF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,WAAW,GAAG,QAAQ,CAAC,EAAE,CAAC;CACtD,CAAC;IACD,IAAa,OAAO,IAAI,MAAM,CAE7B;CACD;;;;AAED,qBAAa,qBAAsB,SAAQ,2BAA0C;IACpF,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC,CAAC;IACD,IAAa,OAAO,IAAI,MAAM,CAE7B;CACD;;;;AAED,qBAAa,wBAAyB,SAAQ,8BAA6C;IAC1F,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC,CAAC;IACD,IAAa,OAAO,IAAI,MAAM,CAE7B;CACD;;;;AAED,qBAAa,kBAAmB,SAAQ,wBAAuC;IAC9E,QAAQ,CAAC,SAAS,EAAE,QAAQ,GAAG,QAAQ,CAAC;IACxC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;CAC9C,CAAC;CAAG;AAEL,wBAAgB,aAAa,CAAC,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,WAAW,CAMrG"}
|
package/dist/server/error.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cause, Data,
|
|
1
|
+
import { Cause, Data, Redacted } from "effect";
|
|
2
2
|
import { failureOutput } from "#server/internal/failureOutput.ts";
|
|
3
3
|
export class PgBossNotFoundError extends Data.TaggedError("PgBossNotFoundError") {
|
|
4
4
|
get message() {
|
|
@@ -40,13 +40,6 @@ export class PgBossClientOptionsError extends Data.TaggedError("PgBossClientOpti
|
|
|
40
40
|
}
|
|
41
41
|
export class PgBossPayloadError extends Data.TaggedError("PgBossPayloadError") {
|
|
42
42
|
}
|
|
43
|
-
export class PgBossTestingError extends Data.TaggedError("PgBossTestingError") {
|
|
44
|
-
}
|
|
45
|
-
export class PgBossWaitError extends Data.TaggedError("PgBossWaitError") {
|
|
46
|
-
get message() {
|
|
47
|
-
return `Gave up after ${Duration.format(this.within)} waiting until ${this.waitingFor}; last seen: ${this.lastSeen}`;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
43
|
export function toPgBossError(operation, error, queue) {
|
|
51
44
|
return new PgBossError({
|
|
52
45
|
operation,
|
package/dist/server/error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/server/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/server/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAoBlE,MAAM,OAAO,mBAAoB,SAAQ,IAAI,CAAC,WAAW,CAAC,qBAAqB,CAI7E;IACD,IAAa,OAAO;QACnB,OAAO,IAAI,CAAC,SAAS,KAAK,aAAa;YACtC,CAAC,CAAC,SAAS,IAAI,CAAC,KAAK,iBAAiB;YACtC,CAAC,CAAC,YAAY,IAAI,CAAC,KAAK,aAAa,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,iBAAiB,CAAC;IACvF,CAAC;CACD;AAED,MAAM,OAAO,WAAY,SAAQ,IAAI,CAAC,WAAW,CAAC,aAAa,CAI7D;IACD,6GAA6G;IAC7G,IAAa,OAAO;QACnB,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,cAAc,IAAI,CAAC,KAAK,EAAE,CAAC;QAC1E,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,C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IACtI,CAAC;CACD;AAED,MAAM,OAAO,wBAAyB,SAAQ,IAAI,CAAC,WAAW,CAAC,0BAA0B,CAGvF;IACD,IAAa,OAAO;QACnB,OAAO,yBAAyB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,wCAAwC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IACnH,CAAC;CACD;AAED,MAAM,OAAO,kBAAmB,SAAQ,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAI3E;CAAG;AAEL,MAAM,UAAU,aAAa,CAAC,SAA0B,EAAE,KAAc,EAAE,KAAc;IACvF,OAAO,IAAI,WAAW,CAAC;QACtB,SAAS;QACT,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;QAC9B,KAAK;KACL,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Context, type Effect } from "effect";
|
|
2
2
|
import type { PgBossClient } from "#server/client.ts";
|
|
3
|
-
import type { PgBossError
|
|
3
|
+
import type { PgBossError } from "#server/error.ts";
|
|
4
4
|
import type { PgBossService } from "#server/service.ts";
|
|
5
5
|
export type StoredJob = Awaited<ReturnType<NonNullable<PgBossClient["findJobs"]>>>[number];
|
|
6
6
|
export type JobAttempt = Pick<StoredJob, "name" | "id" | "retryCount">;
|
|
@@ -16,10 +16,5 @@ declare const JobEngine_base: Context.ServiceClass<JobEngine, "@shivaedev/jobs/J
|
|
|
16
16
|
}>;
|
|
17
17
|
export declare class JobEngine extends JobEngine_base {
|
|
18
18
|
}
|
|
19
|
-
declare const TestingEngine_base: Context.ServiceClass<TestingEngine, "@shivaedev/jobs/TestingEngine", {
|
|
20
|
-
readonly expireAttempt: (job: JobAttempt, cause?: "expiry" | "heartbeat") => Effect.Effect<void, PgBossTestingError>;
|
|
21
|
-
}>;
|
|
22
|
-
export declare class TestingEngine extends TestingEngine_base {
|
|
23
|
-
}
|
|
24
19
|
export {};
|
|
25
20
|
//# sourceMappingURL=engine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../../src/server/internal/engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../../src/server/internal/engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAC3F,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,YAAY,CAAC,CAAC;AACvE,MAAM,MAAM,OAAO,GAAG,kBAAkB,GAAG,YAAY,CAAC;;qBAKrC,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,EAAE,WAAW,CAAC;oBACjF,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,CAAC;uBAC5D,CAClB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EAC5C,KAAK,EAAE,MAAM,KACT,MAAM,CAAC,MAAM,CAAC,SAAS,OAAO,EAAE,EAAE,WAAW,CAAC;6BAC1B,CACxB,GAAG,EAAE,UAAU,EACf,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,KAChB,MAAM,CAAC,MAAM,CAAC;QAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE,WAAW,CAAC;;AAhB5F,qBAAa,SAAU,SAAQ,cAkBC;CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.js","sourceRoot":"","sources":["../../../src/server/internal/engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAe,MAAM,QAAQ,CAAC;AAS9C,MAAM,OAAO,SAAU,SAAQ,OAAO,CAAC,OAAO,EAkB3C,CAAC,2BAA2B,CAAC;CAAG
|
|
1
|
+
{"version":3,"file":"engine.js","sourceRoot":"","sources":["../../../src/server/internal/engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAe,MAAM,QAAQ,CAAC;AAS9C,MAAM,OAAO,SAAU,SAAQ,OAAO,CAAC,OAAO,EAkB3C,CAAC,2BAA2B,CAAC;CAAG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shivaedev/jobs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"description": "Effect-native jobs and lifecycle management for pg-boss",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"effect"
|
|
@@ -43,24 +43,24 @@
|
|
|
43
43
|
"README.md"
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@shivaedev/errors": "0.9.
|
|
47
|
-
"@shivaedev/service": "0.7.
|
|
48
|
-
"@shivaedev/sql": "0.
|
|
46
|
+
"@shivaedev/errors": "0.9.1",
|
|
47
|
+
"@shivaedev/service": "0.7.1",
|
|
48
|
+
"@shivaedev/sql": "0.39.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@shivaedev/http": "0.6.
|
|
52
|
-
"@shivaedev/quality": "0.
|
|
53
|
-
"@shivaedev/test": "0.
|
|
54
|
-
"@shivaedev/test-sql": "0.
|
|
55
|
-
"@shivaedev/test-story": "0.
|
|
51
|
+
"@shivaedev/http": "0.6.1",
|
|
52
|
+
"@shivaedev/quality": "0.61.1",
|
|
53
|
+
"@shivaedev/test-kits": "0.4.0",
|
|
54
|
+
"@shivaedev/test-sql": "0.21.1",
|
|
55
|
+
"@shivaedev/test-story": "0.39.1",
|
|
56
56
|
"@types/node": "24.19.2",
|
|
57
|
-
"effect": "4.0.
|
|
57
|
+
"effect": "4.0.7",
|
|
58
58
|
"pg-boss": "12.38.0",
|
|
59
59
|
"typescript": "7.0.2",
|
|
60
60
|
"vitest": "5.0.5"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"effect": "4.0.
|
|
63
|
+
"effect": "4.0.7",
|
|
64
64
|
"pg-boss": "12.38.0"
|
|
65
65
|
},
|
|
66
66
|
"engines": {
|
|
@@ -2,6 +2,7 @@ import { Effect } from "effect";
|
|
|
2
2
|
import { inspectionChannel } from "#server/adapters/inspectionPlan.ts";
|
|
3
3
|
import type { PgBossClient } from "#server/client.ts";
|
|
4
4
|
import { toPgBossError } from "#server/error.ts";
|
|
5
|
+
import { localInspectionChanges } from "./localInspectionChanges.ts";
|
|
5
6
|
import { queueSignal } from "./queueSignal.ts";
|
|
6
7
|
|
|
7
8
|
export const inspectionChanges = Effect.fnUntraced(function* (client: PgBossClient, schema: string, queue?: string) {
|
|
@@ -9,12 +10,12 @@ export const inspectionChanges = Effect.fnUntraced(function* (client: PgBossClie
|
|
|
9
10
|
yield* Effect.acquireRelease(
|
|
10
11
|
Effect.tryPromise({
|
|
11
12
|
catch: (error) => toPgBossError("inspect", error, queue),
|
|
12
|
-
try: () => {
|
|
13
|
+
try: async () => {
|
|
13
14
|
const db = client.getDb?.();
|
|
14
15
|
if (db?.listen === undefined) {
|
|
15
16
|
throw new TypeError("This pg-boss client does not support listen");
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
+
const listener = await db.listen(
|
|
18
19
|
inspectionChannel(schema),
|
|
19
20
|
(name) => {
|
|
20
21
|
if (queue === undefined || name === queue) {
|
|
@@ -23,6 +24,20 @@ export const inspectionChanges = Effect.fnUntraced(function* (client: PgBossClie
|
|
|
23
24
|
},
|
|
24
25
|
signal.changed,
|
|
25
26
|
);
|
|
27
|
+
const local = localInspectionChanges.get(db) ?? new Set<(schema: string, queue: string) => void>();
|
|
28
|
+
localInspectionChanges.set(db, local);
|
|
29
|
+
function changed(changedSchema: string, name: string) {
|
|
30
|
+
if (changedSchema === schema && (queue === undefined || name === queue)) {
|
|
31
|
+
signal.changed();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
local.add(changed);
|
|
35
|
+
return {
|
|
36
|
+
close: async () => {
|
|
37
|
+
local.delete(changed);
|
|
38
|
+
await listener.close();
|
|
39
|
+
},
|
|
40
|
+
};
|
|
26
41
|
},
|
|
27
42
|
}),
|
|
28
43
|
(listener) => Effect.promise(() => listener.close()),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import type { PgBossClient } from "#server/client.ts";
|
|
3
|
-
import { deferralChanges } from "#server/internal/adapters/deferralChanges.ts";
|
|
4
3
|
import { STATELY_DEFERRAL_POLICY } from "#server/internal/deferral.ts";
|
|
5
4
|
import type { JobAttempt } from "#server/internal/engine.ts";
|
|
6
5
|
import { quotedSchema } from "#server/internal/storedRows.ts";
|
|
6
|
+
import { localInspectionChanges } from "./localInspectionChanges.ts";
|
|
7
7
|
|
|
8
8
|
const Settlement = Schema.Struct({ claimed: Schema.Boolean, deferred: Schema.Boolean });
|
|
9
9
|
|
|
@@ -54,7 +54,9 @@ export async function settleDeferral(client: PgBossClient, schema: string, job:
|
|
|
54
54
|
);
|
|
55
55
|
const settled = Schema.decodeUnknownSync(Settlement)(rows[0]);
|
|
56
56
|
if (settled.deferred) {
|
|
57
|
-
|
|
57
|
+
for (const changed of localInspectionChanges.get(db) ?? []) {
|
|
58
|
+
changed(schema, job.name);
|
|
59
|
+
}
|
|
58
60
|
}
|
|
59
61
|
return settled;
|
|
60
62
|
}
|
package/src/server/error.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cause, Data,
|
|
1
|
+
import { Cause, Data, Redacted } from "effect";
|
|
2
2
|
import { failureOutput } from "#server/internal/failureOutput.ts";
|
|
3
3
|
|
|
4
4
|
export type PgBossOperation =
|
|
@@ -86,22 +86,6 @@ export class PgBossPayloadError extends Data.TaggedError("PgBossPayloadError")<{
|
|
|
86
86
|
readonly original: Redacted.Redacted<unknown>;
|
|
87
87
|
}> {}
|
|
88
88
|
|
|
89
|
-
export class PgBossTestingError extends Data.TaggedError("PgBossTestingError")<{
|
|
90
|
-
readonly operation: string;
|
|
91
|
-
readonly original: Redacted.Redacted<unknown>;
|
|
92
|
-
readonly queue?: string | undefined;
|
|
93
|
-
}> {}
|
|
94
|
-
|
|
95
|
-
export class PgBossWaitError extends Data.TaggedError("PgBossWaitError")<{
|
|
96
|
-
readonly lastSeen: string;
|
|
97
|
-
readonly waitingFor: string;
|
|
98
|
-
readonly within: Duration.Duration;
|
|
99
|
-
}> {
|
|
100
|
-
override get message(): string {
|
|
101
|
-
return `Gave up after ${Duration.format(this.within)} waiting until ${this.waitingFor}; last seen: ${this.lastSeen}`;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
89
|
export function toPgBossError(operation: PgBossOperation, error: unknown, queue?: string): PgBossError {
|
|
106
90
|
return new PgBossError({
|
|
107
91
|
operation,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Context, type Effect } from "effect";
|
|
2
2
|
import type { PgBossClient } from "#server/client.ts";
|
|
3
|
-
import type { PgBossError
|
|
3
|
+
import type { PgBossError } from "#server/error.ts";
|
|
4
4
|
import type { PgBossService } from "#server/service.ts";
|
|
5
5
|
|
|
6
6
|
export type StoredJob = Awaited<ReturnType<NonNullable<PgBossClient["findJobs"]>>>[number];
|
|
@@ -26,10 +26,3 @@ export class JobEngine extends Context.Service<
|
|
|
26
26
|
) => Effect.Effect<{ readonly claimed: boolean; readonly deferred: boolean }, PgBossError>;
|
|
27
27
|
}
|
|
28
28
|
>()("@shivaedev/jobs/JobEngine") {}
|
|
29
|
-
|
|
30
|
-
export class TestingEngine extends Context.Service<
|
|
31
|
-
TestingEngine,
|
|
32
|
-
{
|
|
33
|
-
readonly expireAttempt: (job: JobAttempt, cause?: "expiry" | "heartbeat") => Effect.Effect<void, PgBossTestingError>;
|
|
34
|
-
}
|
|
35
|
-
>()("@shivaedev/jobs/TestingEngine") {}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { EngineClient } from "#server/engineClient.ts";
|
|
2
|
-
import type { JobAttempt } from "#server/internal/engine.ts";
|
|
3
|
-
export declare function expireAttempt(client: EngineClient, schema: string, job: JobAttempt, cause?: "expiry" | "heartbeat"): Promise<void>;
|
|
4
|
-
//# sourceMappingURL=expireAttempt.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"expireAttempt.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/expireAttempt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAG7D,wBAAsB,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,GAAE,QAAQ,GAAG,WAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBlJ"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { quotedSchema } from "#server/internal/storedRows.ts";
|
|
2
|
-
export async function expireAttempt(client, schema, job, cause = "expiry") {
|
|
3
|
-
if ((await client.schemaVersion()) !== 46) {
|
|
4
|
-
throw new Error("Testing expiry requires pg-boss schema version 46");
|
|
5
|
-
}
|
|
6
|
-
const quoted = quotedSchema(schema);
|
|
7
|
-
const timestamp = cause === "expiry" ? "started_on" : "heartbeat_on";
|
|
8
|
-
const seconds = cause === "expiry" ? "expire_seconds" : "heartbeat_seconds";
|
|
9
|
-
await client.getDb().executeSql(`UPDATE ${quoted}.job SET ${timestamp} = ${quoted}.job_now() - (${seconds} + 1) * interval '1 second'
|
|
10
|
-
WHERE name = $1 AND id = $2 AND retry_count = $3 AND state = 'active'`, [job.name, job.id, job.retryCount]);
|
|
11
|
-
// Supervision owns expiry and dead lettering; make its claim due with the job's deadline.
|
|
12
|
-
await client
|
|
13
|
-
.getDb()
|
|
14
|
-
.executeSql(`UPDATE ${quoted}.queue SET monitor_claim_on = ${quoted}.job_now() - interval '1 week' WHERE name = $1`, [job.name]);
|
|
15
|
-
await client.supervise(job.name);
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=expireAttempt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"expireAttempt.js","sourceRoot":"","sources":["../../../src/server/adapters/expireAttempt.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,MAAoB,EAAE,MAAc,EAAE,GAAe,EAAE,KAAK,GAA2B,QAAQ;IAClI,IAAI,CAAC,MAAM,MAAM,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC;QAC3C,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACtE,CAAC;IACD,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,SAAS,GAAG,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,cAAc,CAAC;IACrE,MAAM,OAAO,GAAG,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,mBAAmB,CAAC;IAC5E,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC,UAAU,CAC9B,UAAU,MAAM,YAAY,SAAS,MAAM,MAAM,iBAAiB,OAAO;wEACH,EACtE,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,UAAU,CAAC,CAClC,CAAC;IACF,0FAA0F;IAC1F,MAAM,MAAM;SACV,KAAK,EAAE;SACP,UAAU,CAAC,UAAU,MAAM,iCAAiC,MAAM,gDAAgD,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IAClI,MAAM,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { EngineClient } from "#server/engineClient.ts";
|
|
2
|
-
import type { EnqueueOptions } from "#server/enqueueOptions.ts";
|
|
3
|
-
import type { TestingWork } from "#server/internal/testingIdle.ts";
|
|
4
|
-
export interface TestingControls {
|
|
5
|
-
readonly changed: () => void;
|
|
6
|
-
readonly expirations: Map<string, number>;
|
|
7
|
-
readonly expirySeconds: Map<string, number>;
|
|
8
|
-
readonly failures: Set<string>;
|
|
9
|
-
readonly retryPolicy: Pick<EnqueueOptions, "retryBackoff" | "retryDelay">;
|
|
10
|
-
readonly work: TestingWork;
|
|
11
|
-
}
|
|
12
|
-
export declare function testingClient(client: EngineClient, schema: string, controls: TestingControls): EngineClient;
|
|
13
|
-
//# sourceMappingURL=testingClient.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testingClient.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/testingClient.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,KAAK,EAAgB,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAGjF,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,QAAQ,CAAC,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC/B,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,cAAc,EAAE,cAAc,GAAG,YAAY,CAAC,CAAC;IAC1E,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;CAC3B;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,GAAG,YAAY,CAuG3G"}
|