effect-mq 0.3.1 → 0.4.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/README.md +131 -15
- package/dist/Job.d.ts +131 -9
- package/dist/Job.d.ts.map +1 -1
- package/dist/Job.js +81 -5
- package/dist/Job.js.map +1 -1
- package/dist/JobStore.d.ts +63 -2
- package/dist/JobStore.d.ts.map +1 -1
- package/dist/JobStore.js.map +1 -1
- package/dist/MemoryJobStore.d.ts.map +1 -1
- package/dist/MemoryJobStore.js +159 -119
- package/dist/MemoryJobStore.js.map +1 -1
- package/dist/Worker.d.ts +18 -0
- package/dist/Worker.d.ts.map +1 -1
- package/dist/Worker.js +37 -9
- package/dist/Worker.js.map +1 -1
- package/dist/drizzle-postgres/DrizzleJobStore.d.ts.map +1 -1
- package/dist/drizzle-postgres/DrizzleJobStore.js +239 -49
- package/dist/drizzle-postgres/DrizzleJobStore.js.map +1 -1
- package/dist/drizzle-postgres/schema.d.ts +2 -0
- package/dist/drizzle-postgres/schema.d.ts.map +1 -1
- package/dist/drizzle-postgres/schema.js +1 -0
- package/dist/drizzle-postgres/schema.js.map +1 -1
- package/dist/redis/RedisJobStore.d.ts.map +1 -1
- package/dist/redis/RedisJobStore.js +173 -36
- package/dist/redis/RedisJobStore.js.map +1 -1
- package/dist/redis/scripts.d.ts +24 -1
- package/dist/redis/scripts.d.ts.map +1 -1
- package/dist/redis/scripts.js +126 -21
- package/dist/redis/scripts.js.map +1 -1
- package/dist/testing/TestJobStore.d.ts +95 -0
- package/dist/testing/TestJobStore.d.ts.map +1 -0
- package/dist/testing/TestJobStore.js +88 -0
- package/dist/testing/TestJobStore.js.map +1 -0
- package/dist/testing/conformance.d.ts.map +1 -1
- package/dist/testing/conformance.js +266 -0
- package/dist/testing/conformance.js.map +1 -1
- package/dist/testing/index.d.ts +6 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +6 -0
- package/dist/testing/index.js.map +1 -1
- package/package.json +1 -1
- package/src/Job.ts +268 -13
- package/src/JobStore.ts +77 -2
- package/src/MemoryJobStore.ts +102 -53
- package/src/Worker.ts +61 -9
- package/src/drizzle-postgres/DrizzleJobStore.ts +273 -66
- package/src/drizzle-postgres/schema.ts +2 -0
- package/src/redis/RedisJobStore.ts +236 -47
- package/src/redis/scripts.ts +153 -21
- package/src/testing/TestJobStore.ts +143 -0
- package/src/testing/conformance.ts +350 -0
- package/src/testing/index.ts +7 -0
package/dist/redis/scripts.js
CHANGED
|
@@ -158,6 +158,30 @@ local function finishCancelled(id, queue, name, startedAt, now, nowStr)
|
|
|
158
158
|
releaseDedupe(name, redis.call("HGET", jk, "dedupeKey"), id, now)
|
|
159
159
|
applyKeep(name, "cancelled", redis.call("HGET", jk, "keep"), now)
|
|
160
160
|
end
|
|
161
|
+
-- Insert one fresh job row plus every index entry. String params are stored
|
|
162
|
+
-- verbatim (payload/metadata/backoff/keep/trace are pre-encoded JSON, "" =
|
|
163
|
+
-- absent); priority/delayMs/now numeric-coercible.
|
|
164
|
+
local function insertJobRow(id, name, queue, payloadJson, metadataJson, priority,
|
|
165
|
+
attemptsMax, backoffJson, keepJson, timeoutMs, dedupeKey, traceJson, delayMs, now, nowStr)
|
|
166
|
+
local seq = redis.call("INCR", prefix .. ":seq")
|
|
167
|
+
local state = delayMs > 0 and "delayed" or "waiting"
|
|
168
|
+
local runAt = now + delayMs
|
|
169
|
+
redis.call("HSET", jobKey(id),
|
|
170
|
+
"id", id, "name", name, "queue", queue,
|
|
171
|
+
"payload", payloadJson, "metadata", metadataJson, "state", state,
|
|
172
|
+
"priority", priority, "attemptsMax", attemptsMax, "attemptsMade", "0", "stalledCount", "0",
|
|
173
|
+
"backoff", backoffJson, "keep", keepJson, "timeoutMs", timeoutMs,
|
|
174
|
+
"cancelRequested", "0", "dedupeKey", dedupeKey, "trace", traceJson, "runAt", fmt(runAt), "enqueuedAt", nowStr,
|
|
175
|
+
"processedAt", "", "finishedAt", "", "exit", "", "failedReason", "",
|
|
176
|
+
"lockToken", "", "lockExpiresAt", "", "seq", fmt(seq))
|
|
177
|
+
redis.call("ZADD", prefix .. ":all", now, id)
|
|
178
|
+
if state == "waiting" then
|
|
179
|
+
addWaiting(queue, tonumber(priority), seq, id)
|
|
180
|
+
else
|
|
181
|
+
redis.call("ZADD", delayedKey(queue), runAt, id)
|
|
182
|
+
end
|
|
183
|
+
countsAdd(queue, state, 1)
|
|
184
|
+
end
|
|
161
185
|
`;
|
|
162
186
|
/**
|
|
163
187
|
* enqueue(prefix, idMode, id, name, queue, payloadJson, metadataJson,
|
|
@@ -165,7 +189,7 @@ end
|
|
|
165
189
|
* idMode: "user" (dedup no-op), "generated" (collision -> retry sentinel),
|
|
166
190
|
* "auto" (j-<seq>, in-script collision loop).
|
|
167
191
|
*/
|
|
168
|
-
export const enqueue = Redis.script((prefix, idMode, id, name, queue, payloadJson, metadataJson, priority, attemptsMax, backoffJson, keepJson, timeoutMs, delayMs, now, dedupeKey, dedupeTtlMs, dedupeExtend, dedupeReplace) => [
|
|
192
|
+
export const enqueue = Redis.script((prefix, idMode, id, name, queue, payloadJson, metadataJson, priority, attemptsMax, backoffJson, keepJson, timeoutMs, delayMs, now, dedupeKey, dedupeTtlMs, dedupeExtend, dedupeReplace, traceJson) => [
|
|
169
193
|
prefix,
|
|
170
194
|
idMode,
|
|
171
195
|
id,
|
|
@@ -183,7 +207,8 @@ export const enqueue = Redis.script((prefix, idMode, id, name, queue, payloadJso
|
|
|
183
207
|
dedupeKey,
|
|
184
208
|
dedupeTtlMs,
|
|
185
209
|
dedupeExtend,
|
|
186
|
-
dedupeReplace
|
|
210
|
+
dedupeReplace,
|
|
211
|
+
traceJson
|
|
187
212
|
], {
|
|
188
213
|
numberOfKeys: 0,
|
|
189
214
|
lua: `${HELPERS}
|
|
@@ -221,7 +246,7 @@ if dKey ~= "" then
|
|
|
221
246
|
local newRunAt = now + delayMs
|
|
222
247
|
redis.call("HSET", kjk, "payload", ARGV[6], "metadata", ARGV[7], "priority", ARGV[8],
|
|
223
248
|
"attemptsMax", ARGV[9], "backoff", ARGV[10], "keep", ARGV[11], "timeoutMs", ARGV[12],
|
|
224
|
-
"runAt", fmt(newRunAt))
|
|
249
|
+
"trace", ARGV[19], "runAt", fmt(newRunAt))
|
|
225
250
|
local keyedQueue = redis.call("HGET", kjk, "queue")
|
|
226
251
|
redis.call("ZADD", delayedKey(keyedQueue), newRunAt, entryJob)
|
|
227
252
|
-- A landed replace re-arms the ttl window.
|
|
@@ -255,24 +280,8 @@ if idMode == "auto" then
|
|
|
255
280
|
end
|
|
256
281
|
if id == "" then return '{"error":"id"}' end
|
|
257
282
|
end
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
local runAt = now + delayMs
|
|
261
|
-
redis.call("HSET", jobKey(id),
|
|
262
|
-
"id", id, "name", ARGV[4], "queue", queue,
|
|
263
|
-
"payload", ARGV[6], "metadata", ARGV[7], "state", state,
|
|
264
|
-
"priority", ARGV[8], "attemptsMax", ARGV[9], "attemptsMade", "0", "stalledCount", "0",
|
|
265
|
-
"backoff", ARGV[10], "keep", ARGV[11], "timeoutMs", ARGV[12],
|
|
266
|
-
"cancelRequested", "0", "dedupeKey", dKey, "runAt", fmt(runAt), "enqueuedAt", nowStr,
|
|
267
|
-
"processedAt", "", "finishedAt", "", "exit", "", "failedReason", "",
|
|
268
|
-
"lockToken", "", "lockExpiresAt", "", "seq", fmt(seq))
|
|
269
|
-
redis.call("ZADD", prefix .. ":all", now, id)
|
|
270
|
-
if state == "waiting" then
|
|
271
|
-
addWaiting(queue, tonumber(ARGV[8]), seq, id)
|
|
272
|
-
else
|
|
273
|
-
redis.call("ZADD", delayedKey(queue), runAt, id)
|
|
274
|
-
end
|
|
275
|
-
countsAdd(queue, state, 1)
|
|
283
|
+
insertJobRow(id, ARGV[4], queue, ARGV[6], ARGV[7], ARGV[8], ARGV[9], ARGV[10], ARGV[11],
|
|
284
|
+
ARGV[12], dKey, ARGV[19], delayMs, now, nowStr)
|
|
276
285
|
if dKey ~= "" then
|
|
277
286
|
local sk = dedupeStoreKey(name, dKey)
|
|
278
287
|
redis.call("DEL", sk)
|
|
@@ -831,6 +840,102 @@ redis.call("ZADD", prefix .. ":schedules", tonumber(ARGV[4]), key)
|
|
|
831
840
|
return "1"
|
|
832
841
|
`
|
|
833
842
|
}).withReturnType();
|
|
843
|
+
/**
|
|
844
|
+
* tickSchedule(prefix, key, expectedRunAt, nextRunAt, id, name, queue,
|
|
845
|
+
* payloadJson, metadataJson, priority, attemptsMax, backoffJson, keepJson,
|
|
846
|
+
* timeoutMs, traceJson, delayMs, now) -> "1" fired | "0"
|
|
847
|
+
* Atomic occurrence claim: the nextRunAt CAS and the tick job's insert run
|
|
848
|
+
* in one script, so a stale sweeper can never re-fire a slot — even after
|
|
849
|
+
* retention pruned the previous slot's job row.
|
|
850
|
+
*/
|
|
851
|
+
export const tickSchedule = Redis.script((prefix, key, expectedRunAt, nextRunAt, id, name, queue, payloadJson, metadataJson, priority, attemptsMax, backoffJson, keepJson, timeoutMs, traceJson, delayMs, now) => [
|
|
852
|
+
prefix,
|
|
853
|
+
key,
|
|
854
|
+
expectedRunAt,
|
|
855
|
+
nextRunAt,
|
|
856
|
+
id,
|
|
857
|
+
name,
|
|
858
|
+
queue,
|
|
859
|
+
payloadJson,
|
|
860
|
+
metadataJson,
|
|
861
|
+
priority,
|
|
862
|
+
attemptsMax,
|
|
863
|
+
backoffJson,
|
|
864
|
+
keepJson,
|
|
865
|
+
timeoutMs,
|
|
866
|
+
traceJson,
|
|
867
|
+
delayMs,
|
|
868
|
+
now
|
|
869
|
+
], {
|
|
870
|
+
numberOfKeys: 0,
|
|
871
|
+
lua: `${HELPERS}
|
|
872
|
+
local key = ARGV[2]
|
|
873
|
+
local sk = prefix .. ":schedule:" .. key
|
|
874
|
+
local current = redis.call("HGET", sk, "nextRunAt")
|
|
875
|
+
if current == false or tonumber(current) ~= tonumber(ARGV[3]) then return "0" end
|
|
876
|
+
redis.call("HSET", sk, "nextRunAt", fmt(tonumber(ARGV[4])))
|
|
877
|
+
redis.call("ZADD", prefix .. ":schedules", tonumber(ARGV[4]), key)
|
|
878
|
+
local id = ARGV[5]
|
|
879
|
+
-- Pre-existing slot row (pre-0.4 crash between enqueue and advance): the
|
|
880
|
+
-- schedule still advances, but nothing new fires.
|
|
881
|
+
if redis.call("EXISTS", jobKey(id)) == 1 then return "0" end
|
|
882
|
+
insertJobRow(id, ARGV[6], ARGV[7], ARGV[8], ARGV[9], ARGV[10], ARGV[11], ARGV[12], ARGV[13],
|
|
883
|
+
ARGV[14], "", ARGV[15], tonumber(ARGV[16]), tonumber(ARGV[17]), ARGV[17])
|
|
884
|
+
return "1"
|
|
885
|
+
`
|
|
886
|
+
}).withReturnType();
|
|
887
|
+
/**
|
|
888
|
+
* enqueueMany(prefix, now, count, ...items) -> JSON array of per-item results
|
|
889
|
+
* ({id, duplicate} | {collision} | {error}). Items are 13-ARGV strides:
|
|
890
|
+
* idMode, id, name, queue, payloadJson, metadataJson, priority, attemptsMax,
|
|
891
|
+
* backoffJson, keepJson, timeoutMs, traceJson, delayMs. Plain (non-dedup)
|
|
892
|
+
* items only — the caller routes dedup items through \`enqueue\`.
|
|
893
|
+
*/
|
|
894
|
+
export const enqueueMany = Redis.script((prefix, now, count, items) => [prefix, now, count, ...items], {
|
|
895
|
+
numberOfKeys: 0,
|
|
896
|
+
lua: `${HELPERS}
|
|
897
|
+
local now = tonumber(ARGV[2])
|
|
898
|
+
local nowStr = ARGV[2]
|
|
899
|
+
local count = tonumber(ARGV[3])
|
|
900
|
+
local out = {}
|
|
901
|
+
for i = 0, count - 1 do
|
|
902
|
+
local base = 3 + i * 13
|
|
903
|
+
local idMode = ARGV[base + 1]
|
|
904
|
+
local id = ARGV[base + 2]
|
|
905
|
+
local result
|
|
906
|
+
if idMode ~= "auto" and redis.call("EXISTS", jobKey(id)) == 1 then
|
|
907
|
+
-- Sequential in-script processing makes intra-batch repeats of one user
|
|
908
|
+
-- id resolve exactly like separate enqueues: first inserts, rest dedup.
|
|
909
|
+
if idMode == "user" then
|
|
910
|
+
result = '{"id":' .. cjson.encode(id) .. ',"duplicate":true}'
|
|
911
|
+
else
|
|
912
|
+
result = '{"collision":true}'
|
|
913
|
+
end
|
|
914
|
+
else
|
|
915
|
+
if idMode == "auto" then
|
|
916
|
+
id = ""
|
|
917
|
+
for a = 1, 5 do
|
|
918
|
+
local candidate = "j-" .. fmt(redis.call("INCR", prefix .. ":seq"))
|
|
919
|
+
if redis.call("EXISTS", jobKey(candidate)) == 0 then
|
|
920
|
+
id = candidate
|
|
921
|
+
break
|
|
922
|
+
end
|
|
923
|
+
end
|
|
924
|
+
end
|
|
925
|
+
if id == "" then
|
|
926
|
+
result = '{"error":"id"}'
|
|
927
|
+
else
|
|
928
|
+
insertJobRow(id, ARGV[base + 3], ARGV[base + 4], ARGV[base + 5], ARGV[base + 6],
|
|
929
|
+
ARGV[base + 7], ARGV[base + 8], ARGV[base + 9], ARGV[base + 10], ARGV[base + 11],
|
|
930
|
+
"", ARGV[base + 12], tonumber(ARGV[base + 13]), now, nowStr)
|
|
931
|
+
result = '{"id":' .. cjson.encode(id) .. ',"duplicate":false}'
|
|
932
|
+
end
|
|
933
|
+
end
|
|
934
|
+
out[#out + 1] = result
|
|
935
|
+
end
|
|
936
|
+
return "[" .. table.concat(out, ",") .. "]"
|
|
937
|
+
`
|
|
938
|
+
}).withReturnType();
|
|
834
939
|
/**
|
|
835
940
|
* sweepState(prefix, state, ttlMs, limit, offset, now) -> {scanned, deleted}
|
|
836
941
|
* One bounded page over a terminal state's finished zset, deleting rows past
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scripts.js","sourceRoot":"","sources":["../../src/redis/scripts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAA;AAEnD;;;GAGG;AACH,MAAM,OAAO,GAAG
|
|
1
|
+
{"version":3,"file":"scripts.js","sourceRoot":"","sources":["../../src/redis/scripts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAA;AAEnD;;;GAGG;AACH,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkJf,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CACjC,CACE,MAAc,EACd,MAAc,EACd,EAAU,EACV,IAAY,EACZ,KAAa,EACb,WAAmB,EACnB,YAAoB,EACpB,QAAgB,EAChB,WAAmB,EACnB,WAAmB,EACnB,QAAgB,EAChB,SAAiB,EACjB,OAAe,EACf,GAAW,EACX,SAAiB,EACjB,WAAmB,EACnB,YAAoB,EACpB,aAAqB,EACrB,SAAiB,EACjB,EAAE,CAAC;IACH,MAAM;IACN,MAAM;IACN,EAAE;IACF,IAAI;IACJ,KAAK;IACL,WAAW;IACX,YAAY;IACZ,QAAQ;IACR,WAAW;IACX,WAAW;IACX,QAAQ;IACR,SAAS;IACT,OAAO;IACP,GAAG;IACH,SAAS;IACT,WAAW;IACX,YAAY;IACZ,aAAa;IACb,SAAS;CACV,EACD;IACE,YAAY,EAAE,CAAC;IACf,GAAG,EAAE,GAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkFlB;CACE,CACF,CAAC,cAAc,EAAU,CAAA;AAE1B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAC/B,CAAC,MA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,EAAE,GAAG,KAAK,CAAC,EAC5G;IACE,YAAY,EAAE,CAAC;IACf,GAAG,EAAE,GAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyClB;CACE,CACF,CAAC,cAAc,EAAU,CAAA;AAE1B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CACpC,CAAC,MAAc,EAAE,KAAa,EAAE,KAAa,EAAE,KAAa,EAAE,MAAc,EAAE,GAAW,EAAE,EAAE,CAAC;IAC5F,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,GAAG;CACJ,EACD;IACE,YAAY,EAAE,CAAC;IACf,GAAG,EAAE,GAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6ClB;CACE,CACF,CAAC,cAAc,EAAU,CAAA;AAE1B;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CACtC,CAAC,MAAc,EAAE,KAAa,EAAE,GAAW,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,EACpE;IACE,YAAY,EAAE,CAAC;IACf,GAAG,EAAE,GAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmClB;CACE,CACF,CAAC,cAAc,EAAU,CAAA"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A test harness for asserting what your services enqueue, without running
|
|
3
|
+
* a worker.
|
|
4
|
+
*
|
|
5
|
+
* Provide `TestJobStore.layer` in a unit test and jobs enqueued by the code
|
|
6
|
+
* under test simply accumulate in `waiting`/`delayed` (nothing claims them).
|
|
7
|
+
* `enqueuedOf` returns them with payloads **decoded through the job's own
|
|
8
|
+
* schema** — you assert against the typed values your service produced, not
|
|
9
|
+
* the encoded JSON the store persists:
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { TestJobStore } from "effect-mq/testing"
|
|
13
|
+
*
|
|
14
|
+
* it.effect("signup enqueues a welcome email", () =>
|
|
15
|
+
* Effect.gen(function*() {
|
|
16
|
+
* yield* SignupService.register({ email: "ada@example.com" })
|
|
17
|
+
*
|
|
18
|
+
* const emails = yield* TestJobStore.enqueuedOf(SendEmail)
|
|
19
|
+
* expect(emails).toHaveLength(1)
|
|
20
|
+
* expect(emails[0]?.payload.to).toBe("ada@example.com")
|
|
21
|
+
* expect(emails[0]?.state).toBe("waiting")
|
|
22
|
+
* }).pipe(Effect.provide(TestJobStore.layer)))
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* Jobs bound to named stores use `TestJobStore.layerFor(Durable)` instead.
|
|
26
|
+
* The raw `JobStore` service is also exposed (as `.store`) for advanced
|
|
27
|
+
* scenarios — simulating claims/acks, reading `counts()`, and so on.
|
|
28
|
+
*
|
|
29
|
+
* @since 0.3.2
|
|
30
|
+
*/
|
|
31
|
+
import * as JobStore from "../JobStore.ts";
|
|
32
|
+
import { Context, Effect, Layer, Schema } from "effect";
|
|
33
|
+
/**
|
|
34
|
+
* The minimal structural view of a `Job.make` class that `enqueuedOf`
|
|
35
|
+
* needs: its tag and its JSON payload codec.
|
|
36
|
+
*
|
|
37
|
+
* @since 0.3.2
|
|
38
|
+
*/
|
|
39
|
+
export interface AnyJobDefinition {
|
|
40
|
+
readonly _tag: string;
|
|
41
|
+
readonly payloadJsonSchema: Schema.Top & {
|
|
42
|
+
readonly DecodingServices: never;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* A stored job with its payload decoded back to the definition's payload
|
|
47
|
+
* type.
|
|
48
|
+
*
|
|
49
|
+
* @since 0.3.2
|
|
50
|
+
*/
|
|
51
|
+
export interface EnqueuedJob<Payload> extends Omit<JobStore.JobRecord, "payload"> {
|
|
52
|
+
readonly payload: Payload;
|
|
53
|
+
}
|
|
54
|
+
declare const TestJobStore_base: Context.ServiceClass<TestJobStore, "effect-mq/testing/TestJobStore", {
|
|
55
|
+
store: JobStore.Service;
|
|
56
|
+
enqueued: (name?: string) => Effect.Effect<JobStore.JobRecord[], never, never>;
|
|
57
|
+
enqueuedOf: <J extends AnyJobDefinition>(job: J) => Effect.Effect<EnqueuedJob<J["payloadJsonSchema"]["Type"]>[], never, never>;
|
|
58
|
+
}>;
|
|
59
|
+
/**
|
|
60
|
+
* Inspection API over the test store. `enqueued(name?)` returns raw records
|
|
61
|
+
* oldest-first; `enqueuedOf(JobClass)` additionally decodes payloads through
|
|
62
|
+
* the definition's schema.
|
|
63
|
+
*
|
|
64
|
+
* @since 0.3.2
|
|
65
|
+
*/
|
|
66
|
+
export declare class TestJobStore extends TestJobStore_base {
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* A fresh in-memory store provided as BOTH the default `JobStore` (for the
|
|
70
|
+
* code under test) and the `TestJobStore` inspection service (for the
|
|
71
|
+
* assertions).
|
|
72
|
+
*
|
|
73
|
+
* @since 0.3.2
|
|
74
|
+
*/
|
|
75
|
+
export declare const layer: Layer.Layer<JobStore.JobStore | TestJobStore>;
|
|
76
|
+
/**
|
|
77
|
+
* Like `layer`, for jobs bound to a `JobStore.named(...)` key.
|
|
78
|
+
*
|
|
79
|
+
* @since 0.3.2
|
|
80
|
+
*/
|
|
81
|
+
export declare const layerFor: <Id>(store: Context.Key<Id, JobStore.Service>) => Layer.Layer<Id | TestJobStore>;
|
|
82
|
+
/**
|
|
83
|
+
* Convenience accessors so tests don't have to `yield* TestJobStore` first.
|
|
84
|
+
*
|
|
85
|
+
* @since 0.3.2
|
|
86
|
+
*/
|
|
87
|
+
export declare const enqueuedOf: <J extends AnyJobDefinition>(job: J) => Effect.Effect<Array<EnqueuedJob<J["payloadJsonSchema"]["Type"]>>, never, TestJobStore>;
|
|
88
|
+
/**
|
|
89
|
+
* Raw records (optionally filtered by job name), oldest-first.
|
|
90
|
+
*
|
|
91
|
+
* @since 0.3.2
|
|
92
|
+
*/
|
|
93
|
+
export declare const enqueued: (name?: string) => Effect.Effect<Array<JobStore.JobRecord>, never, TestJobStore>;
|
|
94
|
+
export {};
|
|
95
|
+
//# sourceMappingURL=TestJobStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestJobStore.d.ts","sourceRoot":"","sources":["../../src/testing/TestJobStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAA;AAE1C,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAEvD;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC,GAAG,GAAG;QAAE,QAAQ,CAAC,gBAAgB,EAAE,KAAK,CAAA;KAAE,CAAA;CAC9E;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW,CAAC,OAAO,CAAE,SAAQ,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC/E,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAC1B;;;sBAmBmB,MAAM;iBACX,CAAC,SAAS,gBAAgB,OAAO,CAAC;;AAWjD;;;;;;GAMG;AACH,qBAAa,YAAa,SAAQ,iBAEjC;CAAG;AAEJ;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,GAAG,YAAY,CAK/D,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,QAAQ,GAAI,EAAE,SAClB,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,QAAQ,CAAC,OAAO,CAAC,KACvC,KAAK,CAAC,KAAK,CAAC,EAAE,GAAG,YAAY,CAM7B,CAAA;AAEH;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,gBAAgB,OAC9C,CAAC,KACL,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,CAC5B,CAAA;AAE5D;;;;GAIG;AACH,eAAO,MAAM,QAAQ,UACZ,MAAM,KACZ,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,YAAY,CACJ,CAAA"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A test harness for asserting what your services enqueue, without running
|
|
3
|
+
* a worker.
|
|
4
|
+
*
|
|
5
|
+
* Provide `TestJobStore.layer` in a unit test and jobs enqueued by the code
|
|
6
|
+
* under test simply accumulate in `waiting`/`delayed` (nothing claims them).
|
|
7
|
+
* `enqueuedOf` returns them with payloads **decoded through the job's own
|
|
8
|
+
* schema** — you assert against the typed values your service produced, not
|
|
9
|
+
* the encoded JSON the store persists:
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { TestJobStore } from "effect-mq/testing"
|
|
13
|
+
*
|
|
14
|
+
* it.effect("signup enqueues a welcome email", () =>
|
|
15
|
+
* Effect.gen(function*() {
|
|
16
|
+
* yield* SignupService.register({ email: "ada@example.com" })
|
|
17
|
+
*
|
|
18
|
+
* const emails = yield* TestJobStore.enqueuedOf(SendEmail)
|
|
19
|
+
* expect(emails).toHaveLength(1)
|
|
20
|
+
* expect(emails[0]?.payload.to).toBe("ada@example.com")
|
|
21
|
+
* expect(emails[0]?.state).toBe("waiting")
|
|
22
|
+
* }).pipe(Effect.provide(TestJobStore.layer)))
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* Jobs bound to named stores use `TestJobStore.layerFor(Durable)` instead.
|
|
26
|
+
* The raw `JobStore` service is also exposed (as `.store`) for advanced
|
|
27
|
+
* scenarios — simulating claims/acks, reading `counts()`, and so on.
|
|
28
|
+
*
|
|
29
|
+
* @since 0.3.2
|
|
30
|
+
*/
|
|
31
|
+
import * as JobStore from "../JobStore.js";
|
|
32
|
+
import * as MemoryJobStore from "../MemoryJobStore.js";
|
|
33
|
+
import { Context, Effect, Layer, Schema } from "effect";
|
|
34
|
+
const drainList = (store, name) => Effect.gen(function* () {
|
|
35
|
+
const all = [];
|
|
36
|
+
let cursor = undefined;
|
|
37
|
+
while (true) {
|
|
38
|
+
const page = yield* store.list({ name, cursor, limit: 200 }).pipe(Effect.orDie);
|
|
39
|
+
all.push(...page.items);
|
|
40
|
+
if (page.cursor === undefined)
|
|
41
|
+
break;
|
|
42
|
+
cursor = page.cursor;
|
|
43
|
+
}
|
|
44
|
+
// list() is newest-first; flip to oldest-first for natural reading.
|
|
45
|
+
// Ties (same-instant enqueues) order by id, not submission order.
|
|
46
|
+
return all.toReversed();
|
|
47
|
+
});
|
|
48
|
+
const makeApi = (store) => ({
|
|
49
|
+
store,
|
|
50
|
+
enqueued: (name) => drainList(store, name),
|
|
51
|
+
enqueuedOf: (job) => drainList(store, job._tag).pipe(Effect.flatMap(Effect.forEach((record) => Schema.decodeUnknownEffect(job.payloadJsonSchema)(record.payload).pipe(Effect.orDie, Effect.map((payload) => ({ ...record, payload }))))))
|
|
52
|
+
});
|
|
53
|
+
/**
|
|
54
|
+
* Inspection API over the test store. `enqueued(name?)` returns raw records
|
|
55
|
+
* oldest-first; `enqueuedOf(JobClass)` additionally decodes payloads through
|
|
56
|
+
* the definition's schema.
|
|
57
|
+
*
|
|
58
|
+
* @since 0.3.2
|
|
59
|
+
*/
|
|
60
|
+
export class TestJobStore extends Context.Service()("effect-mq/testing/TestJobStore") {
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* A fresh in-memory store provided as BOTH the default `JobStore` (for the
|
|
64
|
+
* code under test) and the `TestJobStore` inspection service (for the
|
|
65
|
+
* assertions).
|
|
66
|
+
*
|
|
67
|
+
* @since 0.3.2
|
|
68
|
+
*/
|
|
69
|
+
export const layer = Layer.effectContext(Effect.map(MemoryJobStore.makeWith(), (store) => Context.make(JobStore.JobStore, store).pipe(Context.add(TestJobStore, TestJobStore.of(makeApi(store))))));
|
|
70
|
+
/**
|
|
71
|
+
* Like `layer`, for jobs bound to a `JobStore.named(...)` key.
|
|
72
|
+
*
|
|
73
|
+
* @since 0.3.2
|
|
74
|
+
*/
|
|
75
|
+
export const layerFor = (store) => Layer.effectContext(Effect.map(MemoryJobStore.makeWith(), (memory) => Context.make(store, memory).pipe(Context.add(TestJobStore, TestJobStore.of(makeApi(memory))))));
|
|
76
|
+
/**
|
|
77
|
+
* Convenience accessors so tests don't have to `yield* TestJobStore` first.
|
|
78
|
+
*
|
|
79
|
+
* @since 0.3.2
|
|
80
|
+
*/
|
|
81
|
+
export const enqueuedOf = (job) => Effect.flatMap(TestJobStore, (api) => api.enqueuedOf(job));
|
|
82
|
+
/**
|
|
83
|
+
* Raw records (optionally filtered by job name), oldest-first.
|
|
84
|
+
*
|
|
85
|
+
* @since 0.3.2
|
|
86
|
+
*/
|
|
87
|
+
export const enqueued = (name) => Effect.flatMap(TestJobStore, (api) => api.enqueued(name));
|
|
88
|
+
//# sourceMappingURL=TestJobStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestJobStore.js","sourceRoot":"","sources":["../../src/testing/TestJobStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,cAAc,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAuBvD,MAAM,SAAS,GAAG,CAAC,KAAuB,EAAE,IAAa,EAAE,EAAE,CAC3D,MAAM,CA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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conformance.d.ts","sourceRoot":"","sources":["../../src/testing/conformance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAA;AAE1C,OAAO,EAAuB,KAAK,KAAK,EAAU,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"conformance.d.ts","sourceRoot":"","sources":["../../src/testing/conformance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAA;AAE1C,OAAO,EAAuB,KAAK,KAAK,EAAU,MAAM,QAAQ,CAAA;AAkChE;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,SACxB,MAAM,cACA,MAAM,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAC/C,IA8jDF,CAAA"}
|