effect-mq 0.1.0 → 0.3.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.
Files changed (67) hide show
  1. package/README.md +305 -25
  2. package/dist/Job.d.ts +118 -5
  3. package/dist/Job.d.ts.map +1 -1
  4. package/dist/Job.js +119 -4
  5. package/dist/Job.js.map +1 -1
  6. package/dist/JobStore.d.ts +260 -9
  7. package/dist/JobStore.d.ts.map +1 -1
  8. package/dist/JobStore.js +115 -1
  9. package/dist/JobStore.js.map +1 -1
  10. package/dist/MemoryJobStore.d.ts +38 -6
  11. package/dist/MemoryJobStore.d.ts.map +1 -1
  12. package/dist/MemoryJobStore.js +351 -47
  13. package/dist/MemoryJobStore.js.map +1 -1
  14. package/dist/Worker.d.ts +5 -1
  15. package/dist/Worker.d.ts.map +1 -1
  16. package/dist/Worker.js +117 -10
  17. package/dist/Worker.js.map +1 -1
  18. package/dist/{drizzle → drizzle-postgres}/DrizzleJobStore.d.ts +35 -2
  19. package/dist/drizzle-postgres/DrizzleJobStore.d.ts.map +1 -0
  20. package/dist/drizzle-postgres/DrizzleJobStore.js +941 -0
  21. package/dist/drizzle-postgres/DrizzleJobStore.js.map +1 -0
  22. package/dist/drizzle-postgres/index.d.ts.map +1 -0
  23. package/dist/drizzle-postgres/index.js.map +1 -0
  24. package/dist/drizzle-postgres/schema.d.ts +670 -0
  25. package/dist/drizzle-postgres/schema.d.ts.map +1 -0
  26. package/dist/drizzle-postgres/schema.js +150 -0
  27. package/dist/drizzle-postgres/schema.js.map +1 -0
  28. package/dist/redis/RedisJobStore.d.ts +58 -0
  29. package/dist/redis/RedisJobStore.d.ts.map +1 -0
  30. package/dist/redis/RedisJobStore.js +424 -0
  31. package/dist/redis/RedisJobStore.js.map +1 -0
  32. package/dist/redis/index.d.ts +9 -0
  33. package/dist/redis/index.d.ts.map +1 -0
  34. package/dist/redis/index.js +9 -0
  35. package/dist/redis/index.js.map +1 -0
  36. package/dist/redis/scripts.d.ts +181 -0
  37. package/dist/redis/scripts.d.ts.map +1 -0
  38. package/dist/redis/scripts.js +940 -0
  39. package/dist/redis/scripts.js.map +1 -0
  40. package/dist/testing/conformance.d.ts.map +1 -1
  41. package/dist/testing/conformance.js +502 -8
  42. package/dist/testing/conformance.js.map +1 -1
  43. package/package.json +8 -4
  44. package/src/Job.ts +301 -10
  45. package/src/JobStore.ts +373 -9
  46. package/src/MemoryJobStore.ts +440 -53
  47. package/src/Worker.ts +153 -10
  48. package/src/drizzle-postgres/DrizzleJobStore.ts +1311 -0
  49. package/src/drizzle-postgres/schema.ts +279 -0
  50. package/src/redis/RedisJobStore.ts +652 -0
  51. package/src/redis/index.ts +8 -0
  52. package/src/redis/scripts.ts +1055 -0
  53. package/src/testing/conformance.ts +665 -8
  54. package/dist/drizzle/DrizzleJobStore.d.ts.map +0 -1
  55. package/dist/drizzle/DrizzleJobStore.js +0 -426
  56. package/dist/drizzle/DrizzleJobStore.js.map +0 -1
  57. package/dist/drizzle/index.d.ts.map +0 -1
  58. package/dist/drizzle/index.js.map +0 -1
  59. package/dist/drizzle/schema.d.ts +0 -464
  60. package/dist/drizzle/schema.d.ts.map +0 -1
  61. package/dist/drizzle/schema.js +0 -68
  62. package/dist/drizzle/schema.js.map +0 -1
  63. package/src/drizzle/DrizzleJobStore.ts +0 -599
  64. package/src/drizzle/schema.ts +0 -116
  65. /package/dist/{drizzle → drizzle-postgres}/index.d.ts +0 -0
  66. /package/dist/{drizzle → drizzle-postgres}/index.js +0 -0
  67. /package/src/{drizzle → drizzle-postgres}/index.ts +0 -0
package/dist/JobStore.js CHANGED
@@ -16,7 +16,7 @@
16
16
  *
17
17
  * @since 0.1.0
18
18
  */
19
- import { Brand, Context, Data, Predicate } from "effect";
19
+ import { Brand, Context, Cron, Data, Duration, Predicate, Result } from "effect";
20
20
  /**
21
21
  * Brand a raw string as a `JobId`.
22
22
  *
@@ -29,6 +29,38 @@ export const JobId = Brand.nominal();
29
29
  * @since 0.1.0
30
30
  */
31
31
  export const QueueName = Brand.nominal();
32
+ /**
33
+ * Brand a raw string as a `ScheduleKey`.
34
+ *
35
+ * @since 0.2.0
36
+ */
37
+ export const ScheduleKey = Brand.nominal();
38
+ /**
39
+ * Normalize a `HistoryTtlInput` to milliseconds per terminal state.
40
+ *
41
+ * @internal
42
+ */
43
+ export const normalizeHistoryTtl = (input) => {
44
+ if (Predicate.isObject(input) && !Duration.isDuration(input)) {
45
+ if (!("completed" in input || "failed" in input || "cancelled" in input)) {
46
+ // {} or a DurationObject would silently normalize to a 0ms ceiling and
47
+ // wipe all history — refuse loudly; use "90 days"-style inputs.
48
+ throw new Error("effect-mq: historyTtl object must set at least one of completed/failed/cancelled");
49
+ }
50
+ // SAFETY: Duration inputs (numbers, strings, bigints, tuples, Duration
51
+ // instances, DurationObjects) never carry terminal-state keys, so this
52
+ // is the per-state split form.
53
+ const split = input;
54
+ return {
55
+ completed: split.completed !== undefined ? Duration.toMillis(split.completed) : undefined,
56
+ failed: split.failed !== undefined ? Duration.toMillis(split.failed) : undefined,
57
+ cancelled: split.cancelled !== undefined ? Duration.toMillis(split.cancelled) : undefined
58
+ };
59
+ }
60
+ // SAFETY: not the split form (checked above), so a plain Duration input.
61
+ const ms = Duration.toMillis(input);
62
+ return { completed: ms, failed: ms, cancelled: ms };
63
+ };
32
64
  /**
33
65
  * A transient or fatal driver error (connection loss, serialization, etc.).
34
66
  *
@@ -43,6 +75,67 @@ export class JobStoreError extends Data.TaggedError("JobStoreError") {
43
75
  */
44
76
  // oxlint-disable-next-line anti-slop/no-unknown-parameters -- a type guard IS the boundary parser; `unknown` input is its purpose
45
77
  export const isJobStoreError = (u) => Predicate.hasProperty(u, "_tag") && u._tag === "JobStoreError";
78
+ // Identity-based marking (WeakSet, works on frozen error instances) so the
79
+ // error keeps its declared type and schema round-trip untouched.
80
+ const unrecoverableRegistry = new WeakSet();
81
+ /**
82
+ * Mark an error value as unrecoverable: when a handler fails with it, the
83
+ * worker skips the remaining retry budget and fails the job immediately. The
84
+ * error itself is returned unchanged, so typed error channels and schemas
85
+ * are unaffected. Also exported as `Job.unrecoverable`.
86
+ *
87
+ * Marking is identity-based, so it only works for object errors — a
88
+ * primitive (string/number) failure is returned unmarked and retries
89
+ * normally; use the definition-level `retryable` predicate for those.
90
+ *
91
+ * @since 0.2.0
92
+ */
93
+ export const unrecoverable = (error) => {
94
+ if (Object(error) === error) {
95
+ // SAFETY: `Object(x) === x` is true exactly for object values, which is
96
+ // what WeakSet membership requires.
97
+ unrecoverableRegistry.add(error);
98
+ }
99
+ return error;
100
+ };
101
+ /**
102
+ * Whether `unrecoverable` marked this value.
103
+ *
104
+ * @internal
105
+ */
106
+ // oxlint-disable-next-line anti-slop/no-unknown-parameters -- boundary classifier over arbitrary error values
107
+ export const isMarkedUnrecoverable = (u) =>
108
+ // SAFETY: `Object(u) === u` short-circuits to false for primitives, so the
109
+ // assertion only ever passes object values to the WeakSet.
110
+ Object(u) === u && unrecoverableRegistry.has(u);
111
+ /**
112
+ * The next occurrence of a schedule strictly after `now`. `fromSlot` anchors
113
+ * `everyMs` schedules (occurrences stay on the `slot + k * every` grid).
114
+ * Returns undefined for an invalid cron expression.
115
+ *
116
+ * @internal
117
+ */
118
+ export const nextOccurrence = (schedule, fromSlot, now) => {
119
+ if (schedule.cron !== undefined) {
120
+ const parsed = Cron.parse(schedule.cron, schedule.tz);
121
+ if (Result.isFailure(parsed))
122
+ return undefined;
123
+ // Cron.next throws for parseable-but-unsatisfiable expressions (e.g.
124
+ // "0 0 30 2 *"); treat those as invalid rather than defecting the sweep.
125
+ try {
126
+ return Cron.next(parsed.success, new Date(Math.max(fromSlot, now))).getTime();
127
+ }
128
+ catch {
129
+ return undefined;
130
+ }
131
+ }
132
+ if (schedule.everyMs !== undefined && schedule.everyMs > 0) {
133
+ const behind = Math.max(0, now - fromSlot);
134
+ const steps = Math.floor(behind / schedule.everyMs) + 1;
135
+ return fromSlot + steps * schedule.everyMs;
136
+ }
137
+ return undefined;
138
+ };
46
139
  /**
47
140
  * The presented lock token no longer owns the job (it stalled and was
48
141
  * recovered, or another worker claimed it).
@@ -63,6 +156,27 @@ export class JobNotFoundError extends Data.TaggedError("JobNotFoundError") {
63
156
  */
64
157
  export class JobNotRetryableError extends Data.TaggedError("JobNotRetryableError") {
65
158
  }
159
+ /**
160
+ * `cancel` was called on a job that is already terminal.
161
+ *
162
+ * @since 0.2.0
163
+ */
164
+ export class JobNotCancellableError extends Data.TaggedError("JobNotCancellableError") {
165
+ }
166
+ /**
167
+ * `promote` was called on a job that is not in the `delayed` state.
168
+ *
169
+ * @since 0.2.0
170
+ */
171
+ export class JobNotPromotableError extends Data.TaggedError("JobNotPromotableError") {
172
+ }
173
+ /**
174
+ * Raised (as a defect) by `awaitResult` when the awaited job was cancelled.
175
+ *
176
+ * @since 0.2.0
177
+ */
178
+ export class JobCancelledError extends Data.TaggedError("JobCancelledError") {
179
+ }
66
180
  /**
67
181
  * The default store key. Jobs without an explicit `store` binding use this.
68
182
  *
@@ -1 +1 @@
1
- {"version":3,"file":"JobStore.js","sourceRoot":"","sources":["../src/JobStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAA4B,SAAS,EAAE,MAAM,QAAQ,CAAA;AAUlF;;;;GAIG;AACH,MAAM,CAAC,MAAM,KAAK,GAA6B,KAAK,CAAC,OAAO,EAAS,CAAA;AASrE;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAiC,KAAK,CAAC,OAAO,EAAa,CAAA;AAoMjF;;;;GAIG;AACH,MAAM,OAAO,aAAc,SAAQ,IAAI,CAAC,WAAW,CAAC,eAAe,CAGjE;CAAG;AAEL;;;;GAIG;AACH,kIAAkI;AAClI,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAU,EAAsB,EAAE,CAChE,SAAS,CAAC,WAAW,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC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";
14
- import { JobStore, type Service } from "./JobStore.ts";
13
+ import { type Context, Duration, Effect, Layer, type Scope } from "effect";
14
+ import { type HistoryTtlInput, type IdGenerator, JobStore, type Service } from "./JobStore.ts";
15
15
  /**
16
- * Build a fresh in-memory `JobStore` implementation.
16
+ * @since 0.2.0
17
+ */
18
+ export interface MemoryJobStoreOptions {
19
+ /**
20
+ * Store-level retention ceiling: terminal records older than this are
21
+ * removed by a periodic sweep — one duration for all terminal states or a
22
+ * per-state split (`{ completed: "1 day", failed: "30 days" }`). The sweep
23
+ * also honours stricter per-job `keep.age` rules.
24
+ */
25
+ readonly historyTtl?: HistoryTtlInput | undefined;
26
+ /** Sweep cadence (default 1 minute). */
27
+ readonly historySweepInterval?: Duration.Input | undefined;
28
+ /**
29
+ * Generator for store-assigned job ids (e.g. `() => \`job_${ulid()}\``).
30
+ * Default: a `j-<n>` counter. See `JobStore.IdGenerator`.
31
+ */
32
+ readonly idGenerator?: IdGenerator | undefined;
33
+ }
34
+ /**
35
+ * Build a fresh in-memory `JobStore` implementation (no history sweeper —
36
+ * use `makeWith` for `historyTtl` support).
17
37
  *
18
38
  * @since 0.1.0
19
39
  */
20
40
  export declare const make: Effect.Effect<Service>;
21
41
  /**
22
- * A fresh in-memory `JobStore` layer. Pass a named store key to provide a
23
- * `JobStore.named(...)` slot instead of the default.
42
+ * Build a fresh in-memory `JobStore` with options; the history sweeper (when
43
+ * configured) lives in the surrounding `Scope`.
44
+ *
45
+ * @since 0.2.0
46
+ */
47
+ export declare const makeWith: (options?: MemoryJobStoreOptions | undefined) => Effect.Effect<Service, never, Scope.Scope>;
48
+ /**
49
+ * A fresh in-memory `JobStore` layer.
24
50
  *
25
51
  * @since 0.1.0
26
52
  */
27
53
  export declare const layer: Layer.Layer<JobStore>;
54
+ /**
55
+ * An in-memory layer with options (e.g. `historyTtl`).
56
+ *
57
+ * @since 0.2.0
58
+ */
59
+ export declare const layerWith: (options?: MemoryJobStoreOptions | undefined) => Layer.Layer<JobStore>;
28
60
  /**
29
61
  * An in-memory layer for a specific store key.
30
62
  *
31
63
  * @since 0.1.0
32
64
  */
33
- export declare const layerFor: <Id>(store: Context.Key<Id, Service>) => Layer.Layer<Id>;
65
+ export declare const layerFor: <Id>(store: Context.Key<Id, Service>, options?: MemoryJobStoreOptions | undefined) => Layer.Layer<Id>;
34
66
  //# sourceMappingURL=MemoryJobStore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MemoryJobStore.d.ts","sourceRoot":"","sources":["../src/MemoryJobStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAS,KAAK,OAAO,EAAY,MAAM,EAAQ,KAAK,EAAU,MAAM,QAAQ,CAAA;AACnF,OAAO,EASL,QAAQ,EAIR,KAAK,OAAO,EACb,MAAM,eAAe,CAAA;AA0DtB;;;;GAIG;AACH,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAuWtC,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAgC,CAAA;AAExE;;;;GAIG;AACH,eAAO,MAAM,QAAQ,GAAI,EAAE,SAClB,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,OAAO,CAAC,KAC9B,KAAK,CAAC,KAAK,CAAC,EAAE,CAA8B,CAAA"}
1
+ {"version":3,"file":"MemoryJobStore.d.ts","sourceRoot":"","sources":["../src/MemoryJobStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAS,KAAK,OAAO,EAAY,QAAQ,EAAE,MAAM,EAAQ,KAAK,EAAU,KAAK,KAAK,EAAE,MAAM,QAAQ,CAAA;AACzG,OAAO,EAML,KAAK,eAAe,EACpB,KAAK,WAAW,EAShB,QAAQ,EASR,KAAK,OAAO,EACb,MAAM,eAAe,CAAA;AAmuBtB;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;OAKG;IACH,QA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