atomic-queues 1.6.2 → 2.0.1
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 +273 -413
- package/dist/cli/generators/json-schema.d.ts +3 -0
- package/dist/cli/generators/json-schema.d.ts.map +1 -0
- package/dist/cli/generators/json-schema.js +31 -0
- package/dist/cli/generators/json-schema.js.map +1 -0
- package/dist/cli/generators/typescript.d.ts +3 -0
- package/dist/cli/generators/typescript.d.ts.map +1 -0
- package/dist/cli/generators/typescript.js +62 -0
- package/dist/cli/generators/typescript.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +156 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/decorators/actor.decorators.d.ts +4 -0
- package/dist/decorators/actor.decorators.d.ts.map +1 -0
- package/dist/decorators/actor.decorators.js +32 -0
- package/dist/decorators/actor.decorators.js.map +1 -0
- package/dist/decorators/constants.d.ts +5 -12
- package/dist/decorators/constants.d.ts.map +1 -1
- package/dist/decorators/constants.js +10 -16
- package/dist/decorators/constants.js.map +1 -1
- package/dist/decorators/index.d.ts +4 -4
- package/dist/decorators/index.d.ts.map +1 -1
- package/dist/decorators/index.js +4 -4
- package/dist/decorators/index.js.map +1 -1
- package/dist/decorators/interfaces.d.ts +18 -78
- package/dist/decorators/interfaces.d.ts.map +1 -1
- package/dist/decorators/metadata-readers.d.ts +5 -26
- package/dist/decorators/metadata-readers.d.ts.map +1 -1
- package/dist/decorators/metadata-readers.js +16 -33
- package/dist/decorators/metadata-readers.js.map +1 -1
- package/dist/decorators/schema.decorators.d.ts +2 -0
- package/dist/decorators/schema.decorators.d.ts.map +1 -0
- package/dist/decorators/schema.decorators.js +13 -0
- package/dist/decorators/schema.decorators.js.map +1 -0
- package/dist/domain/interfaces/config.interfaces.d.ts +52 -153
- package/dist/domain/interfaces/config.interfaces.d.ts.map +1 -1
- package/dist/domain/interfaces/index.d.ts +0 -7
- package/dist/domain/interfaces/index.d.ts.map +1 -1
- package/dist/domain/interfaces/index.js +0 -7
- package/dist/domain/interfaces/index.js.map +1 -1
- package/dist/domain/interfaces/job.interfaces.d.ts +32 -65
- package/dist/domain/interfaces/job.interfaces.d.ts.map +1 -1
- package/dist/index.d.ts +0 -34
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -39
- package/dist/index.js.map +1 -1
- package/dist/module/atomic-queues.module.d.ts +0 -83
- package/dist/module/atomic-queues.module.d.ts.map +1 -1
- package/dist/module/atomic-queues.module.js +35 -134
- package/dist/module/atomic-queues.module.js.map +1 -1
- package/dist/services/actor-registry/actor-registry.service.d.ts +30 -0
- package/dist/services/actor-registry/actor-registry.service.d.ts.map +1 -0
- package/dist/services/actor-registry/actor-registry.service.js +186 -0
- package/dist/services/actor-registry/actor-registry.service.js.map +1 -0
- package/dist/services/actor-registry/index.d.ts +2 -0
- package/dist/services/actor-registry/index.d.ts.map +1 -0
- package/dist/services/actor-registry/index.js +18 -0
- package/dist/services/actor-registry/index.js.map +1 -0
- package/dist/services/actor-system/actor-system.service.d.ts +19 -0
- package/dist/services/actor-system/actor-system.service.d.ts.map +1 -0
- package/dist/services/actor-system/actor-system.service.js +86 -0
- package/dist/services/actor-system/actor-system.service.js.map +1 -0
- package/dist/services/actor-system/index.d.ts +2 -0
- package/dist/services/actor-system/index.d.ts.map +1 -0
- package/dist/services/{cron-manager → actor-system}/index.js +1 -1
- package/dist/services/actor-system/index.js.map +1 -0
- package/dist/services/command-discovery/command-discovery.service.d.ts +6 -53
- package/dist/services/command-discovery/command-discovery.service.d.ts.map +1 -1
- package/dist/services/command-discovery/command-discovery.service.js +0 -59
- package/dist/services/command-discovery/command-discovery.service.js.map +1 -1
- package/dist/services/constants.d.ts +2 -9
- package/dist/services/constants.d.ts.map +1 -1
- package/dist/services/constants.js +3 -10
- package/dist/services/constants.js.map +1 -1
- package/dist/services/executor-pool/executor-pool.service.d.ts +31 -0
- package/dist/services/executor-pool/executor-pool.service.d.ts.map +1 -0
- package/dist/services/executor-pool/executor-pool.service.js +147 -0
- package/dist/services/executor-pool/executor-pool.service.js.map +1 -0
- package/dist/services/executor-pool/index.d.ts +2 -0
- package/dist/services/executor-pool/index.d.ts.map +1 -0
- package/dist/services/{queue-manager → executor-pool}/index.js +1 -1
- package/dist/services/executor-pool/index.js.map +1 -0
- package/dist/services/gate/gate.service.d.ts +17 -0
- package/dist/services/gate/gate.service.d.ts.map +1 -0
- package/dist/services/gate/gate.service.js +66 -0
- package/dist/services/gate/gate.service.js.map +1 -0
- package/dist/services/gate/index.d.ts +2 -0
- package/dist/services/gate/index.d.ts.map +1 -0
- package/dist/services/{spawn-queue → gate}/index.js +1 -1
- package/dist/services/gate/index.js.map +1 -0
- package/dist/services/handler-executor/handler-executor.service.d.ts +32 -0
- package/dist/services/handler-executor/handler-executor.service.d.ts.map +1 -0
- package/dist/services/handler-executor/handler-executor.service.js +186 -0
- package/dist/services/handler-executor/handler-executor.service.js.map +1 -0
- package/dist/services/handler-executor/index.d.ts +2 -0
- package/dist/services/handler-executor/index.d.ts.map +1 -0
- package/dist/services/handler-executor/index.js +18 -0
- package/dist/services/handler-executor/index.js.map +1 -0
- package/dist/services/index.d.ts +11 -12
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +11 -12
- package/dist/services/index.js.map +1 -1
- package/dist/services/log/index.d.ts +2 -0
- package/dist/services/log/index.d.ts.map +1 -0
- package/dist/services/{index-manager → log}/index.js +1 -1
- package/dist/services/log/index.js.map +1 -0
- package/dist/services/log/log.service.d.ts +21 -0
- package/dist/services/log/log.service.d.ts.map +1 -0
- package/dist/services/log/log.service.js +92 -0
- package/dist/services/log/log.service.js.map +1 -0
- package/dist/services/queue-bus/index.d.ts +0 -4
- package/dist/services/queue-bus/index.d.ts.map +1 -1
- package/dist/services/queue-bus/index.js +0 -4
- package/dist/services/queue-bus/index.js.map +1 -1
- package/dist/services/queue-bus/queue-bus.service.d.ts +44 -198
- package/dist/services/queue-bus/queue-bus.service.d.ts.map +1 -1
- package/dist/services/queue-bus/queue-bus.service.js +103 -259
- package/dist/services/queue-bus/queue-bus.service.js.map +1 -1
- package/dist/services/queue-bus/queue-bus.utils.d.ts +0 -28
- package/dist/services/queue-bus/queue-bus.utils.d.ts.map +1 -1
- package/dist/services/queue-bus/queue-bus.utils.js +1 -41
- package/dist/services/queue-bus/queue-bus.utils.js.map +1 -1
- package/dist/services/registry/index.d.ts +4 -0
- package/dist/services/registry/index.d.ts.map +1 -0
- package/dist/services/{queue-events-manager → registry}/index.js +3 -1
- package/dist/services/registry/index.js.map +1 -0
- package/dist/services/registry/registry.service.d.ts +43 -0
- package/dist/services/registry/registry.service.d.ts.map +1 -0
- package/dist/services/registry/registry.service.js +379 -0
- package/dist/services/registry/registry.service.js.map +1 -0
- package/dist/services/registry/registry.types.d.ts +24 -0
- package/dist/services/registry/registry.types.d.ts.map +1 -0
- package/dist/{domain/interfaces/lock.interfaces.js → services/registry/registry.types.js} +1 -1
- package/dist/services/registry/registry.types.js.map +1 -0
- package/dist/services/registry/schema-converter.d.ts +2 -0
- package/dist/services/registry/schema-converter.d.ts.map +1 -0
- package/dist/services/registry/schema-converter.js +27 -0
- package/dist/services/registry/schema-converter.js.map +1 -0
- package/dist/services/result-collector/index.d.ts +2 -0
- package/dist/services/result-collector/index.d.ts.map +1 -0
- package/dist/services/result-collector/index.js +18 -0
- package/dist/services/result-collector/index.js.map +1 -0
- package/dist/services/result-collector/result-collector.service.d.ts +17 -0
- package/dist/services/result-collector/result-collector.service.d.ts.map +1 -0
- package/dist/services/result-collector/result-collector.service.js +92 -0
- package/dist/services/result-collector/result-collector.service.js.map +1 -0
- package/dist/services/scheduler/index.d.ts +2 -0
- package/dist/services/scheduler/index.d.ts.map +1 -0
- package/dist/services/{job-processor → scheduler}/index.js +1 -1
- package/dist/services/scheduler/index.js.map +1 -0
- package/dist/services/scheduler/scheduler.service.d.ts +17 -0
- package/dist/services/scheduler/scheduler.service.d.ts.map +1 -0
- package/dist/services/scheduler/scheduler.service.js +116 -0
- package/dist/services/scheduler/scheduler.service.js.map +1 -0
- package/dist/services/shutdown/index.d.ts +2 -0
- package/dist/services/shutdown/index.d.ts.map +1 -0
- package/dist/services/shutdown/index.js +18 -0
- package/dist/services/shutdown/index.js.map +1 -0
- package/dist/services/shutdown/shutdown.service.d.ts +8 -0
- package/dist/services/shutdown/shutdown.service.d.ts.map +1 -0
- package/dist/services/shutdown/shutdown.service.js +29 -0
- package/dist/services/shutdown/shutdown.service.js.map +1 -0
- package/dist/utils/index.d.ts +3 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +3 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/naming.utils.d.ts +0 -16
- package/dist/utils/naming.utils.d.ts.map +1 -1
- package/dist/utils/naming.utils.js +0 -29
- package/dist/utils/naming.utils.js.map +1 -1
- package/package.json +19 -11
- package/dist/decorators/legacy.decorators.d.ts +0 -36
- package/dist/decorators/legacy.decorators.d.ts.map +0 -1
- package/dist/decorators/legacy.decorators.js +0 -61
- package/dist/decorators/legacy.decorators.js.map +0 -1
- package/dist/decorators/scaler.decorators.d.ts +0 -65
- package/dist/decorators/scaler.decorators.d.ts.map +0 -1
- package/dist/decorators/scaler.decorators.js +0 -103
- package/dist/decorators/scaler.decorators.js.map +0 -1
- package/dist/decorators/type-guards.d.ts +0 -18
- package/dist/decorators/type-guards.d.ts.map +0 -1
- package/dist/decorators/type-guards.js +0 -32
- package/dist/decorators/type-guards.js.map +0 -1
- package/dist/decorators/worker.decorators.d.ts +0 -58
- package/dist/decorators/worker.decorators.d.ts.map +0 -1
- package/dist/decorators/worker.decorators.js +0 -92
- package/dist/decorators/worker.decorators.js.map +0 -1
- package/dist/domain/interfaces/event.interfaces.d.ts +0 -71
- package/dist/domain/interfaces/event.interfaces.d.ts.map +0 -1
- package/dist/domain/interfaces/event.interfaces.js +0 -3
- package/dist/domain/interfaces/event.interfaces.js.map +0 -1
- package/dist/domain/interfaces/index-tracking.interfaces.d.ts +0 -69
- package/dist/domain/interfaces/index-tracking.interfaces.d.ts.map +0 -1
- package/dist/domain/interfaces/index-tracking.interfaces.js +0 -3
- package/dist/domain/interfaces/index-tracking.interfaces.js.map +0 -1
- package/dist/domain/interfaces/lock.interfaces.d.ts +0 -54
- package/dist/domain/interfaces/lock.interfaces.d.ts.map +0 -1
- package/dist/domain/interfaces/lock.interfaces.js.map +0 -1
- package/dist/domain/interfaces/process.interfaces.d.ts +0 -44
- package/dist/domain/interfaces/process.interfaces.d.ts.map +0 -1
- package/dist/domain/interfaces/process.interfaces.js +0 -3
- package/dist/domain/interfaces/process.interfaces.js.map +0 -1
- package/dist/domain/interfaces/queue.interfaces.d.ts +0 -46
- package/dist/domain/interfaces/queue.interfaces.d.ts.map +0 -1
- package/dist/domain/interfaces/queue.interfaces.js +0 -3
- package/dist/domain/interfaces/queue.interfaces.js.map +0 -1
- package/dist/domain/interfaces/scaling.interfaces.d.ts +0 -62
- package/dist/domain/interfaces/scaling.interfaces.d.ts.map +0 -1
- package/dist/domain/interfaces/scaling.interfaces.js +0 -3
- package/dist/domain/interfaces/scaling.interfaces.js.map +0 -1
- package/dist/domain/interfaces/worker.interfaces.d.ts +0 -120
- package/dist/domain/interfaces/worker.interfaces.d.ts.map +0 -1
- package/dist/domain/interfaces/worker.interfaces.js +0 -3
- package/dist/domain/interfaces/worker.interfaces.js.map +0 -1
- package/dist/services/cron-manager/cron-manager.service.d.ts +0 -199
- package/dist/services/cron-manager/cron-manager.service.d.ts.map +0 -1
- package/dist/services/cron-manager/cron-manager.service.js +0 -583
- package/dist/services/cron-manager/cron-manager.service.js.map +0 -1
- package/dist/services/cron-manager/index.d.ts +0 -2
- package/dist/services/cron-manager/index.d.ts.map +0 -1
- package/dist/services/cron-manager/index.js.map +0 -1
- package/dist/services/index-manager/index-manager.service.d.ts +0 -142
- package/dist/services/index-manager/index-manager.service.d.ts.map +0 -1
- package/dist/services/index-manager/index-manager.service.js +0 -325
- package/dist/services/index-manager/index-manager.service.js.map +0 -1
- package/dist/services/index-manager/index.d.ts +0 -2
- package/dist/services/index-manager/index.d.ts.map +0 -1
- package/dist/services/index-manager/index.js.map +0 -1
- package/dist/services/job-processor/index.d.ts +0 -2
- package/dist/services/job-processor/index.d.ts.map +0 -1
- package/dist/services/job-processor/index.js.map +0 -1
- package/dist/services/job-processor/job-processor.service.d.ts +0 -156
- package/dist/services/job-processor/job-processor.service.d.ts.map +0 -1
- package/dist/services/job-processor/job-processor.service.js +0 -331
- package/dist/services/job-processor/job-processor.service.js.map +0 -1
- package/dist/services/processor-discovery/decorator-discovery.service.d.ts +0 -40
- package/dist/services/processor-discovery/decorator-discovery.service.d.ts.map +0 -1
- package/dist/services/processor-discovery/decorator-discovery.service.js +0 -191
- package/dist/services/processor-discovery/decorator-discovery.service.js.map +0 -1
- package/dist/services/processor-discovery/index.d.ts +0 -6
- package/dist/services/processor-discovery/index.d.ts.map +0 -1
- package/dist/services/processor-discovery/index.js +0 -22
- package/dist/services/processor-discovery/index.js.map +0 -1
- package/dist/services/processor-discovery/processor-discovery.service.d.ts +0 -98
- package/dist/services/processor-discovery/processor-discovery.service.d.ts.map +0 -1
- package/dist/services/processor-discovery/processor-discovery.service.js +0 -258
- package/dist/services/processor-discovery/processor-discovery.service.js.map +0 -1
- package/dist/services/processor-discovery/processor-registry.d.ts +0 -58
- package/dist/services/processor-discovery/processor-registry.d.ts.map +0 -1
- package/dist/services/processor-discovery/processor-registry.js +0 -74
- package/dist/services/processor-discovery/processor-registry.js.map +0 -1
- package/dist/services/processor-discovery/scaling-registration.service.d.ts +0 -60
- package/dist/services/processor-discovery/scaling-registration.service.d.ts.map +0 -1
- package/dist/services/processor-discovery/scaling-registration.service.js +0 -261
- package/dist/services/processor-discovery/scaling-registration.service.js.map +0 -1
- package/dist/services/processor-discovery/worker-factory.service.d.ts +0 -54
- package/dist/services/processor-discovery/worker-factory.service.d.ts.map +0 -1
- package/dist/services/processor-discovery/worker-factory.service.js +0 -185
- package/dist/services/processor-discovery/worker-factory.service.js.map +0 -1
- package/dist/services/queue-bus/entity-target.d.ts +0 -58
- package/dist/services/queue-bus/entity-target.d.ts.map +0 -1
- package/dist/services/queue-bus/entity-target.js +0 -109
- package/dist/services/queue-bus/entity-target.js.map +0 -1
- package/dist/services/queue-bus/queue-bus.types.d.ts +0 -40
- package/dist/services/queue-bus/queue-bus.types.d.ts.map +0 -1
- package/dist/services/queue-bus/queue-bus.types.js +0 -3
- package/dist/services/queue-bus/queue-bus.types.js.map +0 -1
- package/dist/services/queue-bus/queue-target.d.ts +0 -61
- package/dist/services/queue-bus/queue-target.d.ts.map +0 -1
- package/dist/services/queue-bus/queue-target.js +0 -123
- package/dist/services/queue-bus/queue-target.js.map +0 -1
- package/dist/services/queue-events-manager/index.d.ts +0 -2
- package/dist/services/queue-events-manager/index.d.ts.map +0 -1
- package/dist/services/queue-events-manager/index.js.map +0 -1
- package/dist/services/queue-events-manager/queue-events-manager.service.d.ts +0 -120
- package/dist/services/queue-events-manager/queue-events-manager.service.d.ts.map +0 -1
- package/dist/services/queue-events-manager/queue-events-manager.service.js +0 -343
- package/dist/services/queue-events-manager/queue-events-manager.service.js.map +0 -1
- package/dist/services/queue-manager/index.d.ts +0 -2
- package/dist/services/queue-manager/index.d.ts.map +0 -1
- package/dist/services/queue-manager/index.js.map +0 -1
- package/dist/services/queue-manager/queue-manager.service.d.ts +0 -148
- package/dist/services/queue-manager/queue-manager.service.d.ts.map +0 -1
- package/dist/services/queue-manager/queue-manager.service.js +0 -348
- package/dist/services/queue-manager/queue-manager.service.js.map +0 -1
- package/dist/services/resource-lock/index.d.ts +0 -2
- package/dist/services/resource-lock/index.d.ts.map +0 -1
- package/dist/services/resource-lock/index.js +0 -18
- package/dist/services/resource-lock/index.js.map +0 -1
- package/dist/services/resource-lock/resource-lock.service.d.ts +0 -120
- package/dist/services/resource-lock/resource-lock.service.d.ts.map +0 -1
- package/dist/services/resource-lock/resource-lock.service.js +0 -367
- package/dist/services/resource-lock/resource-lock.service.js.map +0 -1
- package/dist/services/service-queue/index.d.ts +0 -3
- package/dist/services/service-queue/index.d.ts.map +0 -1
- package/dist/services/service-queue/index.js +0 -19
- package/dist/services/service-queue/index.js.map +0 -1
- package/dist/services/service-queue/service-queue.service.d.ts +0 -199
- package/dist/services/service-queue/service-queue.service.d.ts.map +0 -1
- package/dist/services/service-queue/service-queue.service.js +0 -617
- package/dist/services/service-queue/service-queue.service.js.map +0 -1
- package/dist/services/service-queue/service-queue.types.d.ts +0 -32
- package/dist/services/service-queue/service-queue.types.d.ts.map +0 -1
- package/dist/services/service-queue/service-queue.types.js +0 -27
- package/dist/services/service-queue/service-queue.types.js.map +0 -1
- package/dist/services/shutdown-state/index.d.ts +0 -2
- package/dist/services/shutdown-state/index.d.ts.map +0 -1
- package/dist/services/shutdown-state/index.js +0 -18
- package/dist/services/shutdown-state/index.js.map +0 -1
- package/dist/services/shutdown-state/shutdown-state.service.d.ts +0 -69
- package/dist/services/shutdown-state/shutdown-state.service.d.ts.map +0 -1
- package/dist/services/shutdown-state/shutdown-state.service.js +0 -127
- package/dist/services/shutdown-state/shutdown-state.service.js.map +0 -1
- package/dist/services/spawn-queue/index.d.ts +0 -2
- package/dist/services/spawn-queue/index.d.ts.map +0 -1
- package/dist/services/spawn-queue/index.js.map +0 -1
- package/dist/services/spawn-queue/spawn-queue.service.d.ts +0 -119
- package/dist/services/spawn-queue/spawn-queue.service.d.ts.map +0 -1
- package/dist/services/spawn-queue/spawn-queue.service.js +0 -273
- package/dist/services/spawn-queue/spawn-queue.service.js.map +0 -1
- package/dist/services/worker-manager/index.d.ts +0 -2
- package/dist/services/worker-manager/index.d.ts.map +0 -1
- package/dist/services/worker-manager/index.js +0 -18
- package/dist/services/worker-manager/index.js.map +0 -1
- package/dist/services/worker-manager/worker-manager.service.d.ts +0 -221
- package/dist/services/worker-manager/worker-manager.service.d.ts.map +0 -1
- package/dist/services/worker-manager/worker-manager.service.js +0 -591
- package/dist/services/worker-manager/worker-manager.service.js.map +0 -1
- package/dist/utils/helpers.d.ts +0 -5
- package/dist/utils/helpers.d.ts.map +0 -1
- package/dist/utils/helpers.js +0 -21
- package/dist/utils/helpers.js.map +0 -1
- package/dist/utils/job.utils.d.ts +0 -50
- package/dist/utils/job.utils.d.ts.map +0 -1
- package/dist/utils/job.utils.js +0 -89
- package/dist/utils/job.utils.js.map +0 -1
|
@@ -1,343 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
|
-
};
|
|
17
|
-
var QueueEventsManagerService_1;
|
|
18
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.QueueEventsManagerService = void 0;
|
|
20
|
-
const common_1 = require("@nestjs/common");
|
|
21
|
-
const bullmq_1 = require("bullmq");
|
|
22
|
-
const ioredis_1 = __importDefault(require("ioredis"));
|
|
23
|
-
const constants_1 = require("../constants");
|
|
24
|
-
const utils_1 = require("../../utils");
|
|
25
|
-
const worker_manager_1 = require("../worker-manager");
|
|
26
|
-
const service_queue_1 = require("../service-queue");
|
|
27
|
-
const spawn_queue_1 = require("../spawn-queue");
|
|
28
|
-
/**
|
|
29
|
-
* QueueEventsManagerService
|
|
30
|
-
*
|
|
31
|
-
* Listens to BullMQ queue events using Redis pub/sub (ecological).
|
|
32
|
-
* When a job is added to a queue and no worker exists, triggers worker spawning.
|
|
33
|
-
*
|
|
34
|
-
* This enables a "scalerless" architecture where:
|
|
35
|
-
* - Workers are spawned on-demand when jobs arrive
|
|
36
|
-
* - Workers terminate themselves when idle
|
|
37
|
-
* - No need for @EntityScaler with @GetActiveEntities
|
|
38
|
-
*
|
|
39
|
-
* Key Features:
|
|
40
|
-
* - Redis pub/sub based (ecological) - no polling
|
|
41
|
-
* - Uses BullMQ's QueueEvents for reliable event delivery
|
|
42
|
-
* - Checks for existing workers before spawning
|
|
43
|
-
* - Integrates with ServiceQueue for distributed coordination
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```typescript
|
|
47
|
-
* // Register a queue for event listening
|
|
48
|
-
* queueEventsManager.registerQueue({
|
|
49
|
-
* queueName: 'aq:table:123:queue',
|
|
50
|
-
* entityType: 'table',
|
|
51
|
-
* extractEntityId: (qn) => qn.split(':')[2], // 123
|
|
52
|
-
* onJobArrived: async (entityType, entityId) => {
|
|
53
|
-
* await createWorkerForEntity(entityType, entityId);
|
|
54
|
-
* },
|
|
55
|
-
* });
|
|
56
|
-
* ```
|
|
57
|
-
*/
|
|
58
|
-
let QueueEventsManagerService = QueueEventsManagerService_1 = class QueueEventsManagerService {
|
|
59
|
-
constructor(redis, config, workerManager, spawnQueueService, serviceQueueManager) {
|
|
60
|
-
this.redis = redis;
|
|
61
|
-
this.config = config;
|
|
62
|
-
this.workerManager = workerManager;
|
|
63
|
-
this.spawnQueueService = spawnQueueService;
|
|
64
|
-
this.serviceQueueManager = serviceQueueManager;
|
|
65
|
-
this.logger = new common_1.Logger(QueueEventsManagerService_1.name);
|
|
66
|
-
this.registeredQueues = new Map();
|
|
67
|
-
// Pattern-based listeners for dynamic queue spawning
|
|
68
|
-
this.entityPatterns = new Map();
|
|
69
|
-
// Global callback for spawning workers
|
|
70
|
-
this.onJobArrivedCallback = null;
|
|
71
|
-
// =========================================================================
|
|
72
|
-
// HOT CACHE — eliminates Redis calls on the warm path entirely.
|
|
73
|
-
// Once we know a worker exists (via Redis check or local creation),
|
|
74
|
-
// we cache the worker name. Subsequent job arrivals for that entity
|
|
75
|
-
// short-circuit without touching Redis at all.
|
|
76
|
-
// =========================================================================
|
|
77
|
-
this.hotCache = new Set();
|
|
78
|
-
this.keyPrefix = (0, utils_1.resolveKeyPrefix)(config);
|
|
79
|
-
this.useServiceQueue = config.serviceQueue?.enabled !== false;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Register a callback to be called when a job arrives for any queue
|
|
83
|
-
* and no worker exists. Used by ProcessorDiscoveryService.
|
|
84
|
-
*/
|
|
85
|
-
setOnJobArrivedCallback(callback) {
|
|
86
|
-
this.onJobArrivedCallback = callback;
|
|
87
|
-
this.logger.debug('OnJobArrived callback registered');
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Register an entity type pattern for automatic queue event listening.
|
|
91
|
-
* When a job is added to any queue matching this pattern, a worker spawn is triggered.
|
|
92
|
-
*/
|
|
93
|
-
registerEntityPattern(entityType, queueNameFn, workerNameFn) {
|
|
94
|
-
// Create a regex pattern extractor by analyzing the queueNameFn
|
|
95
|
-
// We pass a known placeholder and see where it appears in the result
|
|
96
|
-
const placeholder = '__ENTITY_ID_PLACEHOLDER__';
|
|
97
|
-
const sampleQueueName = queueNameFn(placeholder);
|
|
98
|
-
// Escape regex special characters in the parts before/after the placeholder
|
|
99
|
-
const parts = sampleQueueName.split(placeholder);
|
|
100
|
-
const escapeRegex = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
101
|
-
let extractRegex;
|
|
102
|
-
if (parts.length === 2) {
|
|
103
|
-
// Standard case: prefix + entityId + suffix
|
|
104
|
-
const [prefix, suffix] = parts;
|
|
105
|
-
extractRegex = new RegExp(`^${escapeRegex(prefix)}(.+)${escapeRegex(suffix)}$`);
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
// Fallback: try common patterns
|
|
109
|
-
extractRegex = new RegExp(`^(.+)-queue$`);
|
|
110
|
-
}
|
|
111
|
-
const extractEntityId = (queueName) => {
|
|
112
|
-
const match = queueName.match(extractRegex);
|
|
113
|
-
return match ? match[1] : null;
|
|
114
|
-
};
|
|
115
|
-
// Log the derived pattern for debugging
|
|
116
|
-
this.logger.debug(`[${entityType}] Derived queue pattern: ${extractRegex.source} from sample: ${sampleQueueName}`);
|
|
117
|
-
this.entityPatterns.set(entityType, {
|
|
118
|
-
queueNameFn,
|
|
119
|
-
workerNameFn,
|
|
120
|
-
extractEntityId,
|
|
121
|
-
});
|
|
122
|
-
this.logger.log(`Registered entity pattern for '${entityType}' - will listen for job arrivals`);
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Listen for job arrivals on a specific queue.
|
|
126
|
-
* Creates a QueueEvents instance for the queue and listens for 'waiting' events.
|
|
127
|
-
*
|
|
128
|
-
* @param queueName The BullMQ queue name to listen to
|
|
129
|
-
* @param entityType The entity type (e.g., 'table')
|
|
130
|
-
* @param extractEntityId Function to extract entityId from queue name
|
|
131
|
-
*/
|
|
132
|
-
async listenToQueue(queueName, entityType, extractEntityId) {
|
|
133
|
-
if (this.registeredQueues.has(queueName)) {
|
|
134
|
-
this.logger.debug(`Already listening to queue: ${queueName}`);
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
this.logger.debug(`Starting to listen to queue events: ${queueName}`);
|
|
138
|
-
const queueEvents = new bullmq_1.QueueEvents(queueName, {
|
|
139
|
-
connection: this.redis.duplicate(),
|
|
140
|
-
});
|
|
141
|
-
// Listen for job added events (waiting state)
|
|
142
|
-
queueEvents.on('waiting', async ({ jobId }) => {
|
|
143
|
-
await this.handleJobArrived(queueName, entityType, extractEntityId, jobId);
|
|
144
|
-
});
|
|
145
|
-
// Also listen for delayed jobs becoming ready
|
|
146
|
-
queueEvents.on('delayed', async ({ jobId }) => {
|
|
147
|
-
this.logger.debug(`[QueueEvents] Job ${jobId} delayed in ${queueName}`);
|
|
148
|
-
});
|
|
149
|
-
// Store the registered queue
|
|
150
|
-
this.registeredQueues.set(queueName, {
|
|
151
|
-
queueName,
|
|
152
|
-
entityType,
|
|
153
|
-
queueEvents,
|
|
154
|
-
extractEntityId,
|
|
155
|
-
});
|
|
156
|
-
this.logger.log(`Listening to queue events: ${queueName}`);
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Handle job arrival — ultra-low-latency path.
|
|
160
|
-
*
|
|
161
|
-
* Hot path (worker exists in cache): 0 Redis calls. Instant return.
|
|
162
|
-
* Warm path (worker exists in Redis): 1 Redis EXISTS call (O(1)).
|
|
163
|
-
* Cold path (no worker): 1 SET NX claim + direct local creation.
|
|
164
|
-
*
|
|
165
|
-
* This replaces the old flow of: KEYS scan → spawn queue enqueue →
|
|
166
|
-
* spawn queue dequeue → create worker (multiple seconds) with:
|
|
167
|
-
* cache hit → 0ms, or SET NX + local create → ~10ms.
|
|
168
|
-
*/
|
|
169
|
-
async handleJobArrived(queueName, entityType, extractEntityId, jobId) {
|
|
170
|
-
const entityId = extractEntityId(queueName);
|
|
171
|
-
// Check if worker already exists for this entity
|
|
172
|
-
const pattern = this.entityPatterns.get(entityType);
|
|
173
|
-
if (!pattern)
|
|
174
|
-
return;
|
|
175
|
-
const workerName = pattern.workerNameFn(entityId);
|
|
176
|
-
// ── HOT CACHE (0 Redis calls) ────────────────────────────────
|
|
177
|
-
if (this.hotCache.has(workerName))
|
|
178
|
-
return;
|
|
179
|
-
// ── WARM PATH (1 Redis EXISTS — O(1)) ────────────────────────
|
|
180
|
-
const workerExists = await this.workerManager.workerExists(workerName);
|
|
181
|
-
if (workerExists) {
|
|
182
|
-
this.hotCache.add(workerName);
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
// ── COLD PATH — Direct local spawn ───────────────────────────
|
|
186
|
-
// Atomic claim via SET NX: if this pod wins, it creates the
|
|
187
|
-
// worker locally (no spawn queue round-trip). If another pod
|
|
188
|
-
// already claimed it, we skip (that pod is creating it).
|
|
189
|
-
const claimed = await this.workerManager.claimWorkerSlot(workerName);
|
|
190
|
-
if (claimed) {
|
|
191
|
-
this.logger.log(`[QueueEvents] Claimed ${entityType}/${entityId} — creating worker locally`);
|
|
192
|
-
// Direct local spawn (same-pod, no BullMQ round-trip)
|
|
193
|
-
try {
|
|
194
|
-
if (this.onJobArrivedCallback) {
|
|
195
|
-
await this.onJobArrivedCallback(entityType, entityId, queueName);
|
|
196
|
-
}
|
|
197
|
-
else if (this.spawnQueueService) {
|
|
198
|
-
// If only spawn handler is registered, invoke it directly
|
|
199
|
-
await this.spawnQueueService.handleSpawnJobDirect?.(entityType, entityId);
|
|
200
|
-
}
|
|
201
|
-
this.hotCache.add(workerName);
|
|
202
|
-
}
|
|
203
|
-
catch (error) {
|
|
204
|
-
this.logger.error(`[QueueEvents] Direct spawn failed for ${entityType}/${entityId}: ${error.message}`);
|
|
205
|
-
// Fall back to spawn queue if direct creation failed
|
|
206
|
-
if (this.spawnQueueService) {
|
|
207
|
-
await this.spawnQueueService.requestSpawn(entityType, entityId);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
else {
|
|
212
|
-
// Another pod claimed it — it'll be created there.
|
|
213
|
-
// Add to cache after a short delay (the other pod needs time to create).
|
|
214
|
-
setTimeout(() => this.hotCache.add(workerName), 500);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
|
-
* Evict a worker from the hot cache.
|
|
219
|
-
* Called by SpawnQueueService when idle sweep closes a worker,
|
|
220
|
-
* so the next job arrival will trigger a fresh spawn.
|
|
221
|
-
*/
|
|
222
|
-
evictFromHotCache(workerName) {
|
|
223
|
-
this.hotCache.delete(workerName);
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Get the hot cache size (for diagnostics).
|
|
227
|
-
*/
|
|
228
|
-
getHotCacheSize() {
|
|
229
|
-
return this.hotCache.size;
|
|
230
|
-
}
|
|
231
|
-
/**
|
|
232
|
-
* Listen to all queues that match a pattern.
|
|
233
|
-
* Uses Redis SCAN to find existing queues and listens to them.
|
|
234
|
-
* Also sets up keyspace notifications for new queues (if enabled).
|
|
235
|
-
*/
|
|
236
|
-
async listenToEntityTypeQueues(entityType) {
|
|
237
|
-
const pattern = this.entityPatterns.get(entityType);
|
|
238
|
-
if (!pattern) {
|
|
239
|
-
this.logger.warn(`No pattern registered for entity type: ${entityType}`);
|
|
240
|
-
return;
|
|
241
|
-
}
|
|
242
|
-
// Find existing queues matching the pattern
|
|
243
|
-
const queuePattern = `${this.keyPrefix}:${entityType}:*:queue`;
|
|
244
|
-
const bulkQueuePattern = `bull:${this.keyPrefix}:${entityType}:*:queue:*`;
|
|
245
|
-
// Scan for existing BullMQ queue keys
|
|
246
|
-
const keys = await (0, utils_1.scanKeys)(this.redis, bulkQueuePattern);
|
|
247
|
-
const queueNames = new Set();
|
|
248
|
-
for (const key of keys) {
|
|
249
|
-
// Extract queue name from BullMQ key
|
|
250
|
-
// Format: bull:{queueName}:{suffix}
|
|
251
|
-
const match = key.match(/^bull:([^:]+:[^:]+:[^:]+:queue):/);
|
|
252
|
-
if (match) {
|
|
253
|
-
queueNames.add(match[1]);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
this.logger.debug(`Found ${queueNames.size} existing queues for ${entityType}`);
|
|
257
|
-
// Listen to each existing queue
|
|
258
|
-
for (const queueName of queueNames) {
|
|
259
|
-
const extractFn = pattern.extractEntityId;
|
|
260
|
-
if (!extractFn)
|
|
261
|
-
continue;
|
|
262
|
-
// Wrap the extractEntityId to handle null return
|
|
263
|
-
const safeExtract = (qn) => {
|
|
264
|
-
const result = extractFn(qn);
|
|
265
|
-
return result ?? 'unknown';
|
|
266
|
-
};
|
|
267
|
-
await this.listenToQueue(queueName, entityType, safeExtract);
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
/**
|
|
271
|
-
* Ensure we're listening to events for a specific queue.
|
|
272
|
-
* Call this when adding a job to ensure we catch the event.
|
|
273
|
-
*/
|
|
274
|
-
async ensureListening(queueName, entityType) {
|
|
275
|
-
if (this.registeredQueues.has(queueName)) {
|
|
276
|
-
return;
|
|
277
|
-
}
|
|
278
|
-
const pattern = this.entityPatterns.get(entityType);
|
|
279
|
-
if (!pattern || !pattern.extractEntityId) {
|
|
280
|
-
this.logger.debug(`No pattern for ${entityType}, can't auto-listen`);
|
|
281
|
-
return;
|
|
282
|
-
}
|
|
283
|
-
// Wrap the extractEntityId to handle null return
|
|
284
|
-
const extractFn = pattern.extractEntityId;
|
|
285
|
-
const safeExtract = (qn) => {
|
|
286
|
-
const result = extractFn(qn);
|
|
287
|
-
return result ?? 'unknown';
|
|
288
|
-
};
|
|
289
|
-
await this.listenToQueue(queueName, entityType, safeExtract);
|
|
290
|
-
}
|
|
291
|
-
/**
|
|
292
|
-
* Stop listening to a specific queue.
|
|
293
|
-
*/
|
|
294
|
-
async stopListening(queueName) {
|
|
295
|
-
const registered = this.registeredQueues.get(queueName);
|
|
296
|
-
if (!registered) {
|
|
297
|
-
return;
|
|
298
|
-
}
|
|
299
|
-
try {
|
|
300
|
-
await registered.queueEvents.close();
|
|
301
|
-
this.registeredQueues.delete(queueName);
|
|
302
|
-
this.logger.debug(`Stopped listening to queue: ${queueName}`);
|
|
303
|
-
}
|
|
304
|
-
catch (error) {
|
|
305
|
-
this.logger.error(`Error stopping listener for ${queueName}: ${error.message}`);
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
/**
|
|
309
|
-
* Get all registered queue names.
|
|
310
|
-
*/
|
|
311
|
-
getRegisteredQueues() {
|
|
312
|
-
return Array.from(this.registeredQueues.keys());
|
|
313
|
-
}
|
|
314
|
-
/**
|
|
315
|
-
* Cleanup on module destroy.
|
|
316
|
-
*/
|
|
317
|
-
async onModuleDestroy() {
|
|
318
|
-
this.logger.debug('Closing all queue event listeners...');
|
|
319
|
-
const closePromises = Array.from(this.registeredQueues.values()).map(async (registered) => {
|
|
320
|
-
try {
|
|
321
|
-
await registered.queueEvents.close();
|
|
322
|
-
}
|
|
323
|
-
catch (error) {
|
|
324
|
-
this.logger.error(`Error closing queue events for ${registered.queueName}:`, error);
|
|
325
|
-
}
|
|
326
|
-
});
|
|
327
|
-
await Promise.all(closePromises);
|
|
328
|
-
this.registeredQueues.clear();
|
|
329
|
-
this.logger.debug('All queue event listeners closed');
|
|
330
|
-
}
|
|
331
|
-
};
|
|
332
|
-
exports.QueueEventsManagerService = QueueEventsManagerService;
|
|
333
|
-
exports.QueueEventsManagerService = QueueEventsManagerService = QueueEventsManagerService_1 = __decorate([
|
|
334
|
-
(0, common_1.Injectable)(),
|
|
335
|
-
__param(0, (0, common_1.Inject)(constants_1.ATOMIC_QUEUES_REDIS)),
|
|
336
|
-
__param(1, (0, common_1.Inject)(constants_1.ATOMIC_QUEUES_CONFIG)),
|
|
337
|
-
__param(3, (0, common_1.Optional)()),
|
|
338
|
-
__param(4, (0, common_1.Optional)()),
|
|
339
|
-
__metadata("design:paramtypes", [ioredis_1.default, Object, worker_manager_1.WorkerManagerService,
|
|
340
|
-
spawn_queue_1.SpawnQueueService,
|
|
341
|
-
service_queue_1.ServiceQueueManager])
|
|
342
|
-
], QueueEventsManagerService);
|
|
343
|
-
//# sourceMappingURL=queue-events-manager.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queue-events-manager.service.js","sourceRoot":"","sources":["../../../src/services/queue-events-manager/queue-events-manager.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,2CAMwB;AACxB,mCAAqC;AACrC,sDAA4B;AAC5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CAAC;YACvC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,kCAAkC,UAAU,CAAC,SAAS,GAAG,EACzD,KAAK,CACN,CAAC;YACJ,CAAC;QACH,CAAC,CACF,CAAC;QAEF,MAAM,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACjC,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC;QAC9B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACxD,CAAC;CACF,CAAA;AA1VY,8DAAyB;oCAAzB,yBAAyB;IADrC,IAAA,mBAAU,GAAE;IA0BR,WAAA,IAAA,eAAM,EAAC,+BAAmB,CAAC,CAAA;IAC3B,WAAA,IAAA,eAAM,EAAC,gCAAoB,CAAC,CAAA;IAG5B,WAAA,IAAA,iBAAQ,GAAE,CAAA;IACV,WAAA,IAAA,iBAAQ,GAAE,CAAA;qCAL0C,iBAAK,UAG1B,qCAAoB;QACH,+BAAiB;QACf,mCAAmB;GA9B7D,yBAAyB,CA0VrC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/queue-manager/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/queue-manager/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC"}
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { OnModuleDestroy } from '@nestjs/common';
|
|
2
|
-
import { Queue, Job, QueueEvents } from 'bullmq';
|
|
3
|
-
import Redis from 'ioredis';
|
|
4
|
-
import { IQueueManager, IManagedQueue, IJobOptions } from '../../domain';
|
|
5
|
-
import { IAtomicQueuesModuleConfig } from '../../domain';
|
|
6
|
-
interface IQueueEventsManager {
|
|
7
|
-
ensureListening(queueName: string, entityType: string): Promise<void>;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* QueueManagerService
|
|
11
|
-
*
|
|
12
|
-
* Manages dynamic queue creation and destruction per entity.
|
|
13
|
-
* This is the core service for creating queues on-demand for users, tables,
|
|
14
|
-
* or any other entity type that requires atomic processing.
|
|
15
|
-
*
|
|
16
|
-
* Key Features:
|
|
17
|
-
* - Dynamic queue creation with lazy initialization
|
|
18
|
-
* - Entity-specific queue naming conventions
|
|
19
|
-
* - Automatic cleanup on module destroy
|
|
20
|
-
* - Job management (add, delete)
|
|
21
|
-
* - Queue lifecycle management
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```typescript
|
|
25
|
-
* // Get or create a queue for a user
|
|
26
|
-
* const queue = queueManager.getOrCreateEntityQueue('user', '123');
|
|
27
|
-
*
|
|
28
|
-
* // Add a job to the queue
|
|
29
|
-
* await queueManager.addJob('user-123-queue', 'process-message', { text: 'hello' });
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
export declare class QueueManagerService implements IQueueManager, OnModuleDestroy {
|
|
33
|
-
private readonly redis;
|
|
34
|
-
private readonly config;
|
|
35
|
-
private readonly logger;
|
|
36
|
-
private readonly queues;
|
|
37
|
-
private readonly queueEvents;
|
|
38
|
-
private readonly keyPrefix;
|
|
39
|
-
private queueEventsManager;
|
|
40
|
-
constructor(redis: Redis, config: IAtomicQueuesModuleConfig);
|
|
41
|
-
/**
|
|
42
|
-
* Set the QueueEventsManager reference.
|
|
43
|
-
* Called by ProcessorDiscoveryService after initialization.
|
|
44
|
-
*/
|
|
45
|
-
setQueueEventsManager(manager: IQueueEventsManager): void;
|
|
46
|
-
/**
|
|
47
|
-
* Get or create a queue by name.
|
|
48
|
-
* If the queue doesn't exist, it will be created with default configuration.
|
|
49
|
-
*/
|
|
50
|
-
getOrCreateQueue(queueName: string): Queue;
|
|
51
|
-
/**
|
|
52
|
-
* Get or create an entity-specific queue.
|
|
53
|
-
* Uses naming convention: {entityType}-{entityId}-queue
|
|
54
|
-
*/
|
|
55
|
-
getOrCreateEntityQueue(entityType: string, entityId: string): Queue;
|
|
56
|
-
/**
|
|
57
|
-
* Close and remove a specific queue.
|
|
58
|
-
* This will gracefully close the queue and clean up resources.
|
|
59
|
-
*/
|
|
60
|
-
closeQueue(queueName: string): Promise<void>;
|
|
61
|
-
/**
|
|
62
|
-
* Close all managed queues.
|
|
63
|
-
* Called automatically on module destroy.
|
|
64
|
-
*/
|
|
65
|
-
closeAllQueues(): Promise<void>;
|
|
66
|
-
/**
|
|
67
|
-
* Get all managed queue names.
|
|
68
|
-
*/
|
|
69
|
-
getQueueNames(): string[];
|
|
70
|
-
/**
|
|
71
|
-
* Get all queues for a specific entity type.
|
|
72
|
-
*/
|
|
73
|
-
getEntityTypeQueues(entityType: string): IManagedQueue[];
|
|
74
|
-
/**
|
|
75
|
-
* Delete a specific job from a queue.
|
|
76
|
-
*/
|
|
77
|
-
deleteJob(queueName: string, jobId: string): Promise<void>;
|
|
78
|
-
/**
|
|
79
|
-
* Add a job to a queue with optional configuration.
|
|
80
|
-
* If QueueEventsManager is available and entityType is provided,
|
|
81
|
-
* ensures we're listening for job events to trigger auto-spawning.
|
|
82
|
-
*/
|
|
83
|
-
addJob<T>(queueName: string, jobName: string, data: T, options?: IJobOptions & {
|
|
84
|
-
entityType?: string;
|
|
85
|
-
}): Promise<Job<T>>;
|
|
86
|
-
/**
|
|
87
|
-
* Obliterate a queue (remove all jobs and the queue itself).
|
|
88
|
-
* Use with caution - this is destructive.
|
|
89
|
-
*/
|
|
90
|
-
obliterateQueue(queueName: string): Promise<void>;
|
|
91
|
-
/**
|
|
92
|
-
* Get jobs from a queue by state.
|
|
93
|
-
*/
|
|
94
|
-
getJobs(queueName: string, states: ('active' | 'waiting' | 'completed' | 'failed' | 'delayed')[], start?: number, end?: number): Promise<Job[]>;
|
|
95
|
-
/**
|
|
96
|
-
* Get the job count for a queue.
|
|
97
|
-
*/
|
|
98
|
-
getJobCounts(queueName: string): Promise<{
|
|
99
|
-
waiting: number;
|
|
100
|
-
active: number;
|
|
101
|
-
completed: number;
|
|
102
|
-
failed: number;
|
|
103
|
-
delayed: number;
|
|
104
|
-
}>;
|
|
105
|
-
/**
|
|
106
|
-
* Pause a queue.
|
|
107
|
-
*/
|
|
108
|
-
pauseQueue(queueName: string): Promise<void>;
|
|
109
|
-
/**
|
|
110
|
-
* Resume a paused queue.
|
|
111
|
-
*/
|
|
112
|
-
resumeQueue(queueName: string): Promise<void>;
|
|
113
|
-
/**
|
|
114
|
-
* Check if a queue exists.
|
|
115
|
-
*/
|
|
116
|
-
hasQueue(queueName: string): boolean;
|
|
117
|
-
/**
|
|
118
|
-
* Get managed queue info.
|
|
119
|
-
*/
|
|
120
|
-
getManagedQueue(queueName: string): IManagedQueue | undefined;
|
|
121
|
-
/**
|
|
122
|
-
* Get or create QueueEvents for a queue.
|
|
123
|
-
* Used for waitUntilFinished functionality.
|
|
124
|
-
*/
|
|
125
|
-
getQueueEvents(queueName: string): Promise<QueueEvents>;
|
|
126
|
-
/**
|
|
127
|
-
* Create a new BullMQ Queue instance with configuration.
|
|
128
|
-
*/
|
|
129
|
-
private createQueue;
|
|
130
|
-
/**
|
|
131
|
-
* Generate queue name for an entity.
|
|
132
|
-
*/
|
|
133
|
-
private getEntityQueueName;
|
|
134
|
-
/**
|
|
135
|
-
* Normalize queue name to ensure consistency.
|
|
136
|
-
*/
|
|
137
|
-
private normalizeQueueName;
|
|
138
|
-
/**
|
|
139
|
-
* Merge job options with defaults.
|
|
140
|
-
*/
|
|
141
|
-
private mergeJobOptions;
|
|
142
|
-
/**
|
|
143
|
-
* Cleanup on module destroy.
|
|
144
|
-
*/
|
|
145
|
-
onModuleDestroy(): Promise<void>;
|
|
146
|
-
}
|
|
147
|
-
export {};
|
|
148
|
-
//# sourceMappingURL=queue-manager.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"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