Files
nocobase/tests/scripts
Drol e77641ba3c feat(queue): rebuild @nocobase/queue on BullMQ 6.3.6 (#516)
* feat(queue): rebuild @nocobase/queue on BullMQ 6.3.6

Replace the @boringnode/queue wrapper with a per-application QueueService
whose producers, consumers and managers are bound to named queues. A
queueBackend of redis (or a registered BullMQ backend factory) runs on
BullMQ's public Queue and Worker APIs under a hash-tagged prefix; inMemory
runs in the process and persists unfinished jobs to a state file at
shutdown. Both implementations share one consumer layer and one contract
test suite.

- app-server: QueueServiceProvider, queueServiceToken and AppQueueConfig
  replace QueueProvider and its tokens; the queue migration source and
  planAppRuntimeDatabaseTasks are removed; queue.jobs is deprecated,
  ignored and reported once per plugin
- templates: compose QueueServiceProvider, declare memory and redis keys,
  drop the @/jobs alias
- create-plugin: remove the server.jobs capability
- examples: rewrite the queue example on the new API
- docs, Skills and AGENTS.md describe the new contract

* docs(jobs): make JobExecutor the default for background work

The previous commit rewrote every Queue Job reference onto the new queue
API, but most of what those jobs did belongs to @nocobase/jobs now.

- create-plugin: server.jobs generates a JobExecutor job and the provider
  that owns the plugin's executor instead of being removed
- plugin and application development Skills: choose JobExecutor for
  one-off work, ScheduleExecutor for recurring work, Scheduler when
  administrators track it, and a queue only for delays, priorities,
  deduplicating IDs, batches, rate limits and fan-out; jobs receive
  services by closure
- Scheduler Skill, evals and docs: hand a target's lengthy work to a
  JobExecutor with the occurrence's execution record as the reference,
  and let the job decide its terminal outcome; describe Scheduler's own
  jobs backend instead of the removed queue connection
- deployment and Notification Skills: cover the jobs and queue backends
  instead of a queue manager

* refactor(queue): select the implementation with adapter

queueBackend used to pick both the implementation and a BullMQ backend
factory. A configuration now selects the implementation with
`adapter: 'inMemory' | 'redis'`, and the optional `queueBackend` only
names a factory registered with `registerBackend()` for the redis
adapter, defaulting to BullMQ's Redis backend. A registered factory
interprets its own connection, so `connection` is required only on the
Redis backend. `inMemory` is no longer a reserved factory name.
2026-09-30 11:46:47 -04:00
..