Skip to content

Phase 3: Queue core implementation#5

Merged
mcollina merged 5 commits intomainfrom
phase-3-queue-core
Feb 13, 2026
Merged

Phase 3: Queue core implementation#5
mcollina merged 5 commits intomainfrom
phase-3-queue-core

Conversation

@mcollina
Copy link
Copy Markdown
Member

Summary

  • Add Producer class (enqueue, enqueueAndWait, cancel, getResult, getStatus)
  • Add Consumer class (execute, dequeue loop, concurrency, retry logic)
  • Add Queue class combining Producer and Consumer
  • Support async and callback-style job handlers
  • Event emission for completed, failed, error events
  • Use # private class fields consistently

Test plan

  • npm run typecheck passes
  • npm run lint passes
  • npm run test:memory passes (50 tests total: 30 MemoryStorage + 20 Queue)

🤖 Generated with Claude Code

mcollina and others added 5 commits February 13, 2026 19:30
- Add Producer class (enqueue, enqueueAndWait, cancel, getResult, getStatus)
- Add Consumer class (execute, dequeue loop, concurrency, retry logic)
- Add Queue class combining Producer and Consumer
- Support async and callback-style job handlers
- Add comprehensive test suite (20 tests)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Import Job type from source
- Add type annotations to all job handler callbacks
- Fix assertion type narrowing for failedError

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Make MemoryStorage.connect() idempotent to prevent creating multiple
intervals when connect() is called multiple times. Only the last
interval was being cleared in disconnect(), leaving orphan intervals
that kept the Node.js process alive.

Also add CLAUDE.md with resource management guidelines.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Prevents stuck jobs from consuming CI resources indefinitely.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mcollina mcollina merged commit 2fa40dc into main Feb 13, 2026
10 checks passed
@mcollina mcollina deleted the phase-3-queue-core branch February 13, 2026 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant