refactor(queues): migrate from BullMQ to p-limit for deployment management

This commit introduces a new queue system using p-limit, addressing resource issues and improving job cancellation capabilities. Key changes include:
- Removal of Redis dependency, allowing for in-memory queue management.
- Implementation of per-server queues with ordered processing based on server concurrency settings.
- Addition of helper functions for job management and status retrieval, ensuring backward compatibility with existing API endpoints.
- Updates to database schema to support server concurrency settings.

The legacy BullMQ code has been retained for compatibility but is no longer in active use.
This commit is contained in:
Mauricio Siu
2025-08-29 00:08:33 -06:00
parent 7273c636a0
commit 2da2b2dd39
14 changed files with 7214 additions and 171 deletions

14
pnpm-lock.yaml generated
View File

@@ -280,9 +280,6 @@ importers:
boxen:
specifier: ^7.1.1
version: 7.1.1
bullmq:
specifier: 5.4.2
version: 5.4.2
class-variance-authority:
specifier: ^0.7.1
version: 0.7.1
@@ -367,6 +364,9 @@ importers:
otpauth:
specifier: ^9.4.0
version: 9.4.0
p-limit:
specifier: ^7.1.1
version: 7.1.1
pino:
specifier: 9.4.0
version: 9.4.0
@@ -6412,6 +6412,10 @@ packages:
resolution: {integrity: sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==}
engines: {node: '>=18'}
p-limit@7.1.1:
resolution: {integrity: sha512-i8PyM2JnsNChVSYWLr2BAjNoLi0BAYC+wecOnZnVV+YSNJkzP7cWmvI34dk0WArWfH9KwBHNoZI3P3MppImlIA==}
engines: {node: '>=20'}
p-locate@4.1.0:
resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==}
engines: {node: '>=8'}
@@ -13869,6 +13873,10 @@ snapshots:
dependencies:
yocto-queue: 1.2.1
p-limit@7.1.1:
dependencies:
yocto-queue: 1.2.1
p-locate@4.1.0:
dependencies:
p-limit: 2.3.0