AI Agents SDE Task Viewer
      • Pr description
  1. Home
  2. AgentSDE
  3. agent-core
  4. gh-459
  5. changes
  6. pr_description.md
pr_description.md(2.0 KB)· Apr 13, 2026· 2 min read
  • Title
  • Problem
  • Task / Link
  • Changes
  • Notes
  • Testing

Title#

feat: implement #459 — AW-13: Migrate from SqliteJobQueue to BullMQJobQueue and remove SQLite queue

Problem#

The agent-core job queue was backed by SQLite (SqliteJobQueue), which required an in-process database table and manual stale-job recovery on restart. Completing the AW-10 epic requires replacing this with a Redis-backed BullMQ implementation and removing all SQLite queue infrastructure.

Task / Link#

Closes #459 — AW-13: Migrate from SqliteJobQueue to BullMQJobQueue and remove SQLite queue Part of AW-10 epic (#456)

Changes#

  • Created BullMQJobQueue implementing JobQueue interface using BullMQ Queue + Worker (concurrency: 1)
  • Deleted SqliteJobQueue, its spec, and JobEntity — no more SQLite jobs table
  • Updated QueueModule to provide BullMQJobQueue as the sole JOB_QUEUE provider
  • Updated OperationalController metrics endpoint to use BullMQJobQueue.getQueue().getJobCounts() instead of TypeORM repo
  • Updated JobsController to introspect the BullMQ queue (list, get, retry, cancel) instead of TypeORM queries
  • Cleaned up all JobEntity references across database module, control-api module, and spec files
  • Updated .env.example to document Redis vars; removed JOB_QUEUE_DRIVER (no longer needed)

Notes#

  • Job IDs in GET /api/cc/jobs/:id are now strings (BullMQ IDs), not integers — breaking change for that endpoint
  • Metrics endpoint GET /internal/metrics job counts now use BullMQ states (waiting, active, completed, failed, delayed) instead of SQLite states
  • Worker uses concurrency: 1 — serial processing, one job at a time; different from SQLite which allowed per-issue concurrency
  • BullMQ stalled job auto-retry replaces the manual onModuleInit recovery in SqliteJobQueue

Testing#

  • Unit tests updated: 807 tests pass, 0 failures
  • BullMQJobQueue unit spec added with mocked bullmq
  • operational.e2e-spec.ts rewritten to mock BullMQJobQueue for metrics
  • job-queue.e2e-spec.ts rewritten for BullMQJobQueue behaviour
PrdAi-done