@orkestrel/queue 0.0.11 → 0.0.13

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 CHANGED
@@ -1,20 +1,14 @@
1
1
  # @orkestrel/queue
2
2
 
3
- A concurrent, cooperative typed **FIFO job queue**: `Queue` runs enqueued
4
- inputs through a handler under bounded concurrency, with retries and a
5
- per-attempt timeout / abort — each `enqueue` returns a promise that settles
6
- with the job's result. Idle worker loops **park** on a wake list instead of
7
- busy-polling, so an idle queue burns zero CPU; `enqueue` / `resume` wake
8
- exactly one (or all) parked loops. Cancellation is built on the L1 abort +
9
- timeout primitives, so an attempt that ignores its `signal` still fails when
10
- the per-attempt deadline runs out. Durability is opt-in and outstanding-only —
11
- pass a `store` and a `restore()` after a restart re-runs precisely the
12
- unfinished work; `DatabaseQueueStore` persists over any driver, and
13
- `MemoryQueueStore` is the zero-plumbing in-process default. The queue is
14
- observable (a typed `emitter` surfaces `enqueue` / `start` / `retry` /
15
- `success` / `failure` / `abort` / `drain`) and deliberately de-bloated — no
16
- scheduler, no priorities. Environment-agnostic — no I/O, no browser or server
17
- assumptions. Part of the `@orkestrel` line.
3
+ > A concurrent, cooperative FIFO job queue: a bounded-concurrency engine that runs each
4
+ > enqueued input through a handler with retries and a per-attempt timeout or abort, and
5
+ > hands back one promise per `enqueue` that settles with that job's result.
6
+
7
+ Create a queue with the `createQueue` function, hand it the handler that does the work, and
8
+ await each input's result. Pass a `store` where the unfinished work must survive a restart,
9
+ and subscribe to the `emitter` where a logger, a metric, or a trace needs the lifecycle
10
+ moments. Environment-agnostic — no I/O, no browser or server assumptions. Part of the
11
+ `@orkestrel` line.
18
12
 
19
13
  ## Install
20
14
 
@@ -24,8 +18,8 @@ npm install @orkestrel/queue
24
18
 
25
19
  ## Requirements
26
20
 
27
- - Node.js >= 24
28
- - ESM-only (no CommonJS build)
21
+ - Node.js >= 22.12.0
22
+ - ESM and CommonJS builds from one entry point
29
23
 
30
24
  ## Usage
31
25
 
@@ -47,7 +41,7 @@ const status = await queue.enqueue('https://example.com')
47
41
  For the full surface — the `Queue` engine, options, the durable
48
42
  `QueueStoreInterface` (`MemoryQueueStore` / `DatabaseQueueStore`), the
49
43
  observable `emitter`, and usage patterns — see
50
- [`guides/src/queue.md`](guides/src/queue.md).
44
+ [`guides/queue.md`](guides/queue.md).
51
45
 
52
46
  ## Package
53
47