bunqueue 2.8.0 → 2.8.2
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 +44 -11
- package/dist/application/backgroundTasks.d.ts +0 -1
- package/dist/application/backgroundTasks.js +83 -1
- package/dist/application/cleanupTasks.d.ts +0 -1
- package/dist/application/cleanupTasks.js +0 -1
- package/dist/application/clientTracking.d.ts +23 -1
- package/dist/application/clientTracking.js +80 -26
- package/dist/application/contextFactory.d.ts +6 -1
- package/dist/application/contextFactory.js +7 -1
- package/dist/application/dependencyProcessor.d.ts +0 -1
- package/dist/application/dependencyProcessor.js +0 -1
- package/dist/application/dlqManager.d.ts +0 -1
- package/dist/application/dlqManager.js +5 -1
- package/dist/application/eventsManager.d.ts +0 -1
- package/dist/application/eventsManager.js +0 -1
- package/dist/application/jobLogsManager.d.ts +0 -1
- package/dist/application/jobLogsManager.js +0 -1
- package/dist/application/latencyTracker.d.ts +0 -1
- package/dist/application/latencyTracker.js +0 -1
- package/dist/application/lockManager.d.ts +1 -2
- package/dist/application/lockManager.js +1 -2
- package/dist/application/lockOperations.d.ts +0 -1
- package/dist/application/lockOperations.js +0 -1
- package/dist/application/metricsExporter.d.ts +0 -1
- package/dist/application/metricsExporter.js +0 -1
- package/dist/application/monitoringChecks.d.ts +0 -1
- package/dist/application/monitoringChecks.js +0 -1
- package/dist/application/operations/ack.d.ts +0 -1
- package/dist/application/operations/ack.js +32 -34
- package/dist/application/operations/ackHelpers.d.ts +0 -1
- package/dist/application/operations/ackHelpers.js +0 -1
- package/dist/application/operations/index.d.ts +0 -1
- package/dist/application/operations/index.js +0 -1
- package/dist/application/operations/jobManagement.d.ts +1 -2
- package/dist/application/operations/jobManagement.js +3 -3
- package/dist/application/operations/jobStateTransitions.d.ts +0 -1
- package/dist/application/operations/jobStateTransitions.js +0 -1
- package/dist/application/operations/pull.d.ts +0 -1
- package/dist/application/operations/pull.js +0 -1
- package/dist/application/operations/push.d.ts +0 -1
- package/dist/application/operations/push.js +0 -1
- package/dist/application/operations/queryOperations.d.ts +0 -1
- package/dist/application/operations/queryOperations.js +37 -4
- package/dist/application/operations/queueControl.d.ts +16 -5
- package/dist/application/operations/queueControl.js +119 -24
- package/dist/application/queueManager.d.ts +17 -4
- package/dist/application/queueManager.js +106 -28
- package/dist/application/stallDetection.d.ts +0 -1
- package/dist/application/stallDetection.js +1 -1
- package/dist/application/statsManager.d.ts +0 -1
- package/dist/application/statsManager.js +0 -1
- package/dist/application/taskErrorTracking.d.ts +0 -1
- package/dist/application/taskErrorTracking.js +0 -1
- package/dist/application/throughputTracker.d.ts +0 -1
- package/dist/application/throughputTracker.js +0 -1
- package/dist/application/types.d.ts +2 -2
- package/dist/application/types.js +0 -1
- package/dist/application/webhookManager.d.ts +0 -1
- package/dist/application/webhookManager.js +0 -1
- package/dist/application/workerManager.d.ts +0 -1
- package/dist/application/workerManager.js +0 -1
- package/dist/cli/client.d.ts +0 -1
- package/dist/cli/client.js +15 -3
- package/dist/cli/commands/backup.d.ts +0 -1
- package/dist/cli/commands/backup.js +0 -1
- package/dist/cli/commands/core.d.ts +0 -1
- package/dist/cli/commands/core.js +0 -1
- package/dist/cli/commands/cron.d.ts +0 -1
- package/dist/cli/commands/cron.js +0 -1
- package/dist/cli/commands/dlq.d.ts +0 -1
- package/dist/cli/commands/dlq.js +0 -1
- package/dist/cli/commands/doctor.d.ts +0 -1
- package/dist/cli/commands/doctor.js +0 -1
- package/dist/cli/commands/job.d.ts +0 -1
- package/dist/cli/commands/job.js +0 -1
- package/dist/cli/commands/monitor.d.ts +0 -1
- package/dist/cli/commands/monitor.js +0 -1
- package/dist/cli/commands/queue.d.ts +0 -1
- package/dist/cli/commands/queue.js +0 -1
- package/dist/cli/commands/rateLimit.d.ts +0 -1
- package/dist/cli/commands/rateLimit.js +0 -1
- package/dist/cli/commands/server.d.ts +0 -1
- package/dist/cli/commands/server.js +0 -1
- package/dist/cli/commands/types.d.ts +0 -1
- package/dist/cli/commands/types.js +0 -1
- package/dist/cli/commands/webhook.d.ts +0 -1
- package/dist/cli/commands/webhook.js +0 -1
- package/dist/cli/commands/worker.d.ts +0 -1
- package/dist/cli/commands/worker.js +0 -1
- package/dist/cli/help.d.ts +0 -1
- package/dist/cli/help.js +0 -1
- package/dist/cli/index.d.ts +0 -1
- package/dist/cli/index.js +31 -3
- package/dist/cli/output.d.ts +1 -2
- package/dist/cli/output.js +71 -10
- package/dist/client/bunqueue/aging.d.ts +0 -1
- package/dist/client/bunqueue/aging.js +0 -1
- package/dist/client/bunqueue/batch.d.ts +0 -1
- package/dist/client/bunqueue/batch.js +2 -3
- package/dist/client/bunqueue/cancellation.d.ts +0 -1
- package/dist/client/bunqueue/cancellation.js +0 -1
- package/dist/client/bunqueue/circuitBreaker.d.ts +0 -1
- package/dist/client/bunqueue/circuitBreaker.js +0 -1
- package/dist/client/bunqueue/dedupDebounce.d.ts +0 -1
- package/dist/client/bunqueue/dedupDebounce.js +0 -1
- package/dist/client/bunqueue/dlqRateLimit.d.ts +0 -1
- package/dist/client/bunqueue/dlqRateLimit.js +0 -1
- package/dist/client/bunqueue/retry.d.ts +0 -1
- package/dist/client/bunqueue/retry.js +0 -1
- package/dist/client/bunqueue/triggers.d.ts +0 -1
- package/dist/client/bunqueue/triggers.js +0 -1
- package/dist/client/bunqueue/ttl.d.ts +0 -1
- package/dist/client/bunqueue/ttl.js +0 -1
- package/dist/client/bunqueue/types.d.ts +0 -1
- package/dist/client/bunqueue/types.js +0 -1
- package/dist/client/bunqueue.d.ts +0 -1
- package/dist/client/bunqueue.js +3 -4
- package/dist/client/errors.d.ts +0 -1
- package/dist/client/errors.js +0 -1
- package/dist/client/events.d.ts +0 -1
- package/dist/client/events.js +0 -1
- package/dist/client/flow.d.ts +0 -1
- package/dist/client/flow.js +3 -2
- package/dist/client/flowJobFactory.d.ts +8 -2
- package/dist/client/flowJobFactory.js +328 -57
- package/dist/client/flowPush.d.ts +0 -1
- package/dist/client/flowPush.js +95 -47
- package/dist/client/flowTypes.d.ts +0 -1
- package/dist/client/flowTypes.js +0 -1
- package/dist/client/index.d.ts +0 -1
- package/dist/client/index.js +0 -1
- package/dist/client/jobConversion.d.ts +0 -1
- package/dist/client/jobConversion.js +12 -5
- package/dist/client/jobConversionHelpers.d.ts +0 -1
- package/dist/client/jobConversionHelpers.js +0 -1
- package/dist/client/jobConversionTypes.d.ts +0 -1
- package/dist/client/jobConversionTypes.js +0 -1
- package/dist/client/jobHelpers.d.ts +0 -1
- package/dist/client/jobHelpers.js +0 -1
- package/dist/client/manager.d.ts +0 -1
- package/dist/client/manager.js +0 -1
- package/dist/client/queue/addBatcher.d.ts +0 -1
- package/dist/client/queue/addBatcher.js +0 -1
- package/dist/client/queue/bullmqCompat.d.ts +1 -1
- package/dist/client/queue/bullmqCompat.js +0 -1
- package/dist/client/queue/deduplication.d.ts +0 -1
- package/dist/client/queue/deduplication.js +0 -1
- package/dist/client/queue/dlq.d.ts +0 -1
- package/dist/client/queue/dlq.js +0 -1
- package/dist/client/queue/dlqOps.d.ts +0 -1
- package/dist/client/queue/dlqOps.js +0 -1
- package/dist/client/queue/helpers.d.ts +0 -1
- package/dist/client/queue/helpers.js +0 -1
- package/dist/client/queue/index.d.ts +0 -1
- package/dist/client/queue/index.js +0 -1
- package/dist/client/queue/jobMove.d.ts +0 -1
- package/dist/client/queue/jobMove.js +0 -1
- package/dist/client/queue/jobProxy.d.ts +22 -4
- package/dist/client/queue/jobProxy.js +347 -67
- package/dist/client/queue/operations/add.d.ts +1 -1
- package/dist/client/queue/operations/add.js +126 -30
- package/dist/client/queue/operations/control.d.ts +0 -1
- package/dist/client/queue/operations/control.js +0 -1
- package/dist/client/queue/operations/counts.d.ts +0 -1
- package/dist/client/queue/operations/counts.js +0 -1
- package/dist/client/queue/operations/index.d.ts +0 -1
- package/dist/client/queue/operations/index.js +0 -1
- package/dist/client/queue/operations/management.d.ts +1 -2
- package/dist/client/queue/operations/management.js +27 -10
- package/dist/client/queue/operations/query.d.ts +12 -1
- package/dist/client/queue/operations/query.js +44 -5
- package/dist/client/queue/queue.d.ts +0 -1
- package/dist/client/queue/queue.js +8 -2
- package/dist/client/queue/queueTypes.d.ts +0 -1
- package/dist/client/queue/queueTypes.js +0 -1
- package/dist/client/queue/rateLimit.d.ts +0 -1
- package/dist/client/queue/rateLimit.js +0 -1
- package/dist/client/queue/scheduler.d.ts +2 -1
- package/dist/client/queue/scheduler.js +28 -1
- package/dist/client/queue/stall.d.ts +0 -1
- package/dist/client/queue/stall.js +0 -1
- package/dist/client/queue/workers.d.ts +0 -1
- package/dist/client/queue/workers.js +0 -1
- package/dist/client/queue.d.ts +0 -1
- package/dist/client/queue.js +0 -1
- package/dist/client/queueGroup.d.ts +0 -1
- package/dist/client/queueGroup.js +0 -1
- package/dist/client/resolveToken.d.ts +0 -1
- package/dist/client/resolveToken.js +0 -1
- package/dist/client/sandboxed/index.d.ts +0 -1
- package/dist/client/sandboxed/index.js +0 -1
- package/dist/client/sandboxed/queueOps.d.ts +0 -1
- package/dist/client/sandboxed/queueOps.js +0 -1
- package/dist/client/sandboxed/types.d.ts +0 -1
- package/dist/client/sandboxed/types.js +0 -1
- package/dist/client/sandboxed/worker.d.ts +0 -1
- package/dist/client/sandboxed/worker.js +57 -16
- package/dist/client/sandboxed/wrapper.d.ts +0 -1
- package/dist/client/sandboxed/wrapper.js +62 -11
- package/dist/client/sandboxedWorker.d.ts +0 -1
- package/dist/client/sandboxedWorker.js +0 -1
- package/dist/client/tcp/client.d.ts +9 -1
- package/dist/client/tcp/client.js +84 -29
- package/dist/client/tcp/connection.d.ts +0 -1
- package/dist/client/tcp/connection.js +6 -2
- package/dist/client/tcp/health.d.ts +0 -1
- package/dist/client/tcp/health.js +0 -1
- package/dist/client/tcp/index.d.ts +0 -1
- package/dist/client/tcp/index.js +0 -1
- package/dist/client/tcp/reconnect.d.ts +0 -1
- package/dist/client/tcp/reconnect.js +0 -1
- package/dist/client/tcp/shared.d.ts +0 -1
- package/dist/client/tcp/shared.js +0 -1
- package/dist/client/tcp/types.d.ts +7 -1
- package/dist/client/tcp/types.js +0 -1
- package/dist/client/tcpClient.d.ts +0 -1
- package/dist/client/tcpClient.js +0 -1
- package/dist/client/tcpPool.d.ts +0 -1
- package/dist/client/tcpPool.js +0 -1
- package/dist/client/types.d.ts +8 -5
- package/dist/client/types.js +0 -1
- package/dist/client/worker/ackBatcher.d.ts +0 -1
- package/dist/client/worker/ackBatcher.js +18 -9
- package/dist/client/worker/groupConcurrency.d.ts +0 -1
- package/dist/client/worker/groupConcurrency.js +0 -1
- package/dist/client/worker/index.d.ts +0 -1
- package/dist/client/worker/index.js +0 -1
- package/dist/client/worker/jobParser.d.ts +0 -1
- package/dist/client/worker/jobParser.js +0 -1
- package/dist/client/worker/processor.d.ts +0 -1
- package/dist/client/worker/processor.js +54 -100
- package/dist/client/worker/processorHandlers.d.ts +54 -0
- package/dist/client/worker/processorHandlers.js +372 -0
- package/dist/client/worker/types.d.ts +0 -1
- package/dist/client/worker/types.js +0 -1
- package/dist/client/worker/worker.d.ts +0 -1
- package/dist/client/worker/worker.js +0 -1
- package/dist/client/worker/workerHeartbeat.d.ts +0 -1
- package/dist/client/worker/workerHeartbeat.js +0 -1
- package/dist/client/worker/workerPull.d.ts +0 -1
- package/dist/client/worker/workerPull.js +0 -1
- package/dist/client/worker/workerRateLimiter.d.ts +0 -1
- package/dist/client/worker/workerRateLimiter.js +0 -1
- package/dist/client/worker.d.ts +0 -1
- package/dist/client/worker.js +0 -1
- package/dist/client/workflow/compensator.d.ts +14 -0
- package/dist/client/workflow/compensator.js +45 -0
- package/dist/client/workflow/emitter.d.ts +0 -1
- package/dist/client/workflow/emitter.js +15 -4
- package/dist/client/workflow/engine.d.ts +8 -2
- package/dist/client/workflow/engine.js +9 -1
- package/dist/client/workflow/executor.d.ts +5 -3
- package/dist/client/workflow/executor.js +43 -61
- package/dist/client/workflow/index.d.ts +1 -2
- package/dist/client/workflow/index.js +0 -1
- package/dist/client/workflow/loops.d.ts +1 -2
- package/dist/client/workflow/loops.js +10 -2
- package/dist/client/workflow/recovery.d.ts +22 -0
- package/dist/client/workflow/recovery.js +73 -0
- package/dist/client/workflow/runner.d.ts +0 -1
- package/dist/client/workflow/runner.js +7 -6
- package/dist/client/workflow/store.d.ts +2 -1
- package/dist/client/workflow/store.js +6 -1
- package/dist/client/workflow/types.d.ts +41 -23
- package/dist/client/workflow/types.js +0 -1
- package/dist/client/workflow/workflow.d.ts +17 -15
- package/dist/client/workflow/workflow.js +30 -21
- package/dist/config/index.d.ts +0 -1
- package/dist/config/index.js +0 -1
- package/dist/config/loader.d.ts +0 -1
- package/dist/config/loader.js +0 -1
- package/dist/config/resolve.d.ts +0 -1
- package/dist/config/resolve.js +0 -1
- package/dist/config/types.d.ts +0 -1
- package/dist/config/types.js +0 -1
- package/dist/domain/queue/dependencyTracker.d.ts +0 -1
- package/dist/domain/queue/dependencyTracker.js +0 -1
- package/dist/domain/queue/dlqShard.d.ts +0 -1
- package/dist/domain/queue/dlqShard.js +6 -1
- package/dist/domain/queue/index.d.ts +0 -1
- package/dist/domain/queue/index.js +0 -1
- package/dist/domain/queue/limiterManager.d.ts +0 -1
- package/dist/domain/queue/limiterManager.js +0 -1
- package/dist/domain/queue/priorityQueue.d.ts +2 -3
- package/dist/domain/queue/priorityQueue.js +5 -4
- package/dist/domain/queue/shard.d.ts +0 -1
- package/dist/domain/queue/shard.js +0 -1
- package/dist/domain/queue/shardCounters.d.ts +0 -1
- package/dist/domain/queue/shardCounters.js +0 -1
- package/dist/domain/queue/temporalManager.d.ts +0 -1
- package/dist/domain/queue/temporalManager.js +0 -1
- package/dist/domain/queue/uniqueKeyManager.d.ts +0 -1
- package/dist/domain/queue/uniqueKeyManager.js +0 -1
- package/dist/domain/queue/waiterManager.d.ts +0 -1
- package/dist/domain/queue/waiterManager.js +0 -1
- package/dist/domain/types/command.d.ts +22 -1
- package/dist/domain/types/command.js +0 -1
- package/dist/domain/types/cron.d.ts +21 -1
- package/dist/domain/types/cron.js +1 -1
- package/dist/domain/types/deduplication.d.ts +0 -1
- package/dist/domain/types/deduplication.js +0 -1
- package/dist/domain/types/dlq.d.ts +0 -1
- package/dist/domain/types/dlq.js +0 -1
- package/dist/domain/types/index.d.ts +0 -1
- package/dist/domain/types/index.js +0 -1
- package/dist/domain/types/job.d.ts +0 -1
- package/dist/domain/types/job.js +9 -3
- package/dist/domain/types/queue.d.ts +0 -1
- package/dist/domain/types/queue.js +0 -1
- package/dist/domain/types/response.d.ts +2 -1
- package/dist/domain/types/response.js +0 -1
- package/dist/domain/types/stall.d.ts +0 -1
- package/dist/domain/types/stall.js +0 -1
- package/dist/domain/types/webhook.d.ts +0 -1
- package/dist/domain/types/webhook.js +0 -1
- package/dist/domain/types/worker.d.ts +0 -1
- package/dist/domain/types/worker.js +0 -1
- package/dist/infrastructure/backup/index.d.ts +0 -1
- package/dist/infrastructure/backup/index.js +0 -1
- package/dist/infrastructure/backup/s3Backup.d.ts +0 -1
- package/dist/infrastructure/backup/s3Backup.js +0 -1
- package/dist/infrastructure/backup/s3BackupConfig.d.ts +0 -1
- package/dist/infrastructure/backup/s3BackupConfig.js +0 -1
- package/dist/infrastructure/backup/s3BackupOperations.d.ts +0 -1
- package/dist/infrastructure/backup/s3BackupOperations.js +44 -7
- package/dist/infrastructure/cloud/buffer.d.ts +0 -1
- package/dist/infrastructure/cloud/buffer.js +0 -1
- package/dist/infrastructure/cloud/circuitBreaker.d.ts +0 -1
- package/dist/infrastructure/cloud/circuitBreaker.js +0 -1
- package/dist/infrastructure/cloud/cloudAgent.d.ts +1 -2
- package/dist/infrastructure/cloud/cloudAgent.js +9 -12
- package/dist/infrastructure/cloud/commandHandler.d.ts +0 -1
- package/dist/infrastructure/cloud/commandHandler.js +0 -1
- package/dist/infrastructure/cloud/commands.d.ts +0 -1
- package/dist/infrastructure/cloud/commands.js +2 -3
- package/dist/infrastructure/cloud/config.d.ts +0 -1
- package/dist/infrastructure/cloud/config.js +0 -1
- package/dist/infrastructure/cloud/httpSender.d.ts +0 -1
- package/dist/infrastructure/cloud/httpSender.js +0 -1
- package/dist/infrastructure/cloud/index.d.ts +0 -1
- package/dist/infrastructure/cloud/index.js +0 -1
- package/dist/infrastructure/cloud/logger.d.ts +0 -1
- package/dist/infrastructure/cloud/logger.js +0 -1
- package/dist/infrastructure/cloud/redact.d.ts +10 -0
- package/dist/infrastructure/cloud/redact.js +21 -0
- package/dist/infrastructure/cloud/snapshotCollector.d.ts +4 -1
- package/dist/infrastructure/cloud/snapshotCollector.js +32 -18
- package/dist/infrastructure/cloud/snapshotHelpers.d.ts +9 -3
- package/dist/infrastructure/cloud/snapshotHelpers.js +10 -9
- package/dist/infrastructure/cloud/statsRefresh.d.ts +0 -1
- package/dist/infrastructure/cloud/statsRefresh.js +0 -1
- package/dist/infrastructure/cloud/statsUpdate.d.ts +0 -1
- package/dist/infrastructure/cloud/statsUpdate.js +0 -1
- package/dist/infrastructure/cloud/types.d.ts +0 -1
- package/dist/infrastructure/cloud/types.js +0 -1
- package/dist/infrastructure/cloud/wsSender.d.ts +0 -1
- package/dist/infrastructure/cloud/wsSender.js +0 -1
- package/dist/infrastructure/persistence/index.d.ts +0 -1
- package/dist/infrastructure/persistence/index.js +0 -1
- package/dist/infrastructure/persistence/schema.d.ts +2 -3
- package/dist/infrastructure/persistence/schema.js +16 -3
- package/dist/infrastructure/persistence/sqlite.d.ts +54 -2
- package/dist/infrastructure/persistence/sqlite.js +174 -3
- package/dist/infrastructure/persistence/sqliteBatch.d.ts +14 -1
- package/dist/infrastructure/persistence/sqliteBatch.js +29 -1
- package/dist/infrastructure/persistence/sqliteSerializer.d.ts +16 -1
- package/dist/infrastructure/persistence/sqliteSerializer.js +73 -9
- package/dist/infrastructure/persistence/statements.d.ts +2 -2
- package/dist/infrastructure/persistence/statements.js +3 -3
- package/dist/infrastructure/scheduler/cronParser.d.ts +0 -1
- package/dist/infrastructure/scheduler/cronParser.js +0 -1
- package/dist/infrastructure/scheduler/cronScheduler.d.ts +0 -1
- package/dist/infrastructure/scheduler/cronScheduler.js +19 -2
- package/dist/infrastructure/scheduler/index.d.ts +0 -1
- package/dist/infrastructure/scheduler/index.js +0 -1
- package/dist/infrastructure/server/handler.d.ts +0 -1
- package/dist/infrastructure/server/handler.js +0 -1
- package/dist/infrastructure/server/handlerRoutes.d.ts +0 -1
- package/dist/infrastructure/server/handlerRoutes.js +0 -1
- package/dist/infrastructure/server/handlers/advanced.d.ts +7 -2
- package/dist/infrastructure/server/handlers/advanced.js +41 -11
- package/dist/infrastructure/server/handlers/core.d.ts +0 -1
- package/dist/infrastructure/server/handlers/core.js +8 -1
- package/dist/infrastructure/server/handlers/cron.d.ts +0 -1
- package/dist/infrastructure/server/handlers/cron.js +1 -1
- package/dist/infrastructure/server/handlers/dashboard.d.ts +0 -1
- package/dist/infrastructure/server/handlers/dashboard.js +1 -1
- package/dist/infrastructure/server/handlers/dlq.d.ts +0 -1
- package/dist/infrastructure/server/handlers/dlq.js +0 -1
- package/dist/infrastructure/server/handlers/index.d.ts +0 -1
- package/dist/infrastructure/server/handlers/index.js +0 -1
- package/dist/infrastructure/server/handlers/management.d.ts +1 -2
- package/dist/infrastructure/server/handlers/management.js +27 -13
- package/dist/infrastructure/server/handlers/monitoring.d.ts +0 -1
- package/dist/infrastructure/server/handlers/monitoring.js +0 -1
- package/dist/infrastructure/server/handlers/query.d.ts +0 -1
- package/dist/infrastructure/server/handlers/query.js +0 -1
- package/dist/infrastructure/server/http.d.ts +0 -1
- package/dist/infrastructure/server/http.js +0 -1
- package/dist/infrastructure/server/httpEndpoints.d.ts +0 -1
- package/dist/infrastructure/server/httpEndpoints.js +0 -1
- package/dist/infrastructure/server/httpRouteJobs.d.ts +0 -1
- package/dist/infrastructure/server/httpRouteJobs.js +0 -1
- package/dist/infrastructure/server/httpRouteQueueConfig.d.ts +0 -1
- package/dist/infrastructure/server/httpRouteQueueConfig.js +0 -1
- package/dist/infrastructure/server/httpRouteQueues.d.ts +0 -1
- package/dist/infrastructure/server/httpRouteQueues.js +0 -1
- package/dist/infrastructure/server/httpRouteResources.d.ts +0 -1
- package/dist/infrastructure/server/httpRouteResources.js +0 -1
- package/dist/infrastructure/server/index.d.ts +0 -1
- package/dist/infrastructure/server/index.js +0 -1
- package/dist/infrastructure/server/protocol.d.ts +4 -1
- package/dist/infrastructure/server/protocol.js +17 -3
- package/dist/infrastructure/server/rateLimiter.d.ts +0 -1
- package/dist/infrastructure/server/rateLimiter.js +0 -1
- package/dist/infrastructure/server/socketWriteQueue.d.ts +66 -0
- package/dist/infrastructure/server/socketWriteQueue.js +126 -0
- package/dist/infrastructure/server/sseHandler.d.ts +0 -1
- package/dist/infrastructure/server/sseHandler.js +0 -1
- package/dist/infrastructure/server/tcp.d.ts +17 -1
- package/dist/infrastructure/server/tcp.js +112 -15
- package/dist/infrastructure/server/types.d.ts +0 -1
- package/dist/infrastructure/server/types.js +0 -1
- package/dist/infrastructure/server/wsHandler.d.ts +0 -1
- package/dist/infrastructure/server/wsHandler.js +0 -1
- package/dist/main.d.ts +0 -1
- package/dist/main.js +48 -44
- package/dist/mcp/adapter.d.ts +3 -4
- package/dist/mcp/adapter.js +48 -16
- package/dist/mcp/httpHandler.d.ts +0 -1
- package/dist/mcp/httpHandler.js +0 -1
- package/dist/mcp/index.d.ts +3 -4
- package/dist/mcp/index.js +26 -90
- package/dist/mcp/prompts.d.ts +0 -1
- package/dist/mcp/prompts.js +0 -1
- package/dist/mcp/resources.d.ts +0 -1
- package/dist/mcp/resources.js +0 -1
- package/dist/mcp/server.d.ts +15 -0
- package/dist/mcp/server.js +100 -0
- package/dist/mcp/tools/consumptionTools.d.ts +0 -1
- package/dist/mcp/tools/consumptionTools.js +0 -1
- package/dist/mcp/tools/cronTools.d.ts +0 -1
- package/dist/mcp/tools/cronTools.js +0 -1
- package/dist/mcp/tools/dlqTools.d.ts +0 -1
- package/dist/mcp/tools/dlqTools.js +0 -1
- package/dist/mcp/tools/flowTools.d.ts +0 -1
- package/dist/mcp/tools/flowTools.js +0 -1
- package/dist/mcp/tools/handlerTools.d.ts +0 -1
- package/dist/mcp/tools/handlerTools.js +0 -1
- package/dist/mcp/tools/jobMgmtTools.d.ts +0 -1
- package/dist/mcp/tools/jobMgmtTools.js +0 -1
- package/dist/mcp/tools/jobTools.d.ts +0 -1
- package/dist/mcp/tools/jobTools.js +0 -1
- package/dist/mcp/tools/mcpTracker.d.ts +0 -1
- package/dist/mcp/tools/mcpTracker.js +0 -1
- package/dist/mcp/tools/monitoringTools.d.ts +0 -1
- package/dist/mcp/tools/monitoringTools.js +0 -1
- package/dist/mcp/tools/queueTools.d.ts +0 -1
- package/dist/mcp/tools/queueTools.js +6 -4
- package/dist/mcp/tools/rateLimitTools.d.ts +0 -1
- package/dist/mcp/tools/rateLimitTools.js +0 -1
- package/dist/mcp/tools/webhookTools.d.ts +0 -1
- package/dist/mcp/tools/webhookTools.js +1 -2
- package/dist/mcp/tools/withErrorHandler.d.ts +0 -1
- package/dist/mcp/tools/withErrorHandler.js +0 -1
- package/dist/mcp/tools/workerMgmtTools.d.ts +0 -1
- package/dist/mcp/tools/workerMgmtTools.js +0 -1
- package/dist/shared/boundedMap.d.ts +0 -1
- package/dist/shared/boundedMap.js +0 -1
- package/dist/shared/boundedSet.d.ts +0 -1
- package/dist/shared/boundedSet.js +0 -1
- package/dist/shared/hash.d.ts +0 -1
- package/dist/shared/hash.js +0 -1
- package/dist/shared/histogram.d.ts +0 -1
- package/dist/shared/histogram.js +0 -1
- package/dist/shared/index.d.ts +0 -1
- package/dist/shared/index.js +0 -1
- package/dist/shared/lock.d.ts +0 -1
- package/dist/shared/lock.js +15 -1
- package/dist/shared/logger.d.ts +0 -1
- package/dist/shared/logger.js +0 -1
- package/dist/shared/lru.d.ts +0 -1
- package/dist/shared/lru.js +0 -1
- package/dist/shared/lruMap.d.ts +0 -1
- package/dist/shared/lruMap.js +0 -1
- package/dist/shared/lruSet.d.ts +0 -1
- package/dist/shared/lruSet.js +0 -1
- package/dist/shared/minHeap.d.ts +0 -1
- package/dist/shared/minHeap.js +0 -1
- package/dist/shared/semaphore.d.ts +0 -1
- package/dist/shared/semaphore.js +0 -1
- package/dist/shared/serialization.d.ts +0 -1
- package/dist/shared/serialization.js +0 -1
- package/dist/shared/skipList.d.ts +0 -1
- package/dist/shared/skipList.js +0 -1
- package/dist/shared/ttlMap.d.ts +0 -1
- package/dist/shared/ttlMap.js +0 -1
- package/dist/shared/version.d.ts +0 -1
- package/dist/shared/version.js +0 -1
- package/dist/shared/webhookValidation.d.ts +0 -1
- package/dist/shared/webhookValidation.js +0 -1
- package/package.json +12 -9
- package/dist/application/backgroundTasks.d.ts.map +0 -1
- package/dist/application/backgroundTasks.js.map +0 -1
- package/dist/application/cleanupTasks.d.ts.map +0 -1
- package/dist/application/cleanupTasks.js.map +0 -1
- package/dist/application/clientTracking.d.ts.map +0 -1
- package/dist/application/clientTracking.js.map +0 -1
- package/dist/application/contextFactory.d.ts.map +0 -1
- package/dist/application/contextFactory.js.map +0 -1
- package/dist/application/dependencyProcessor.d.ts.map +0 -1
- package/dist/application/dependencyProcessor.js.map +0 -1
- package/dist/application/dlqManager.d.ts.map +0 -1
- package/dist/application/dlqManager.js.map +0 -1
- package/dist/application/eventsManager.d.ts.map +0 -1
- package/dist/application/eventsManager.js.map +0 -1
- package/dist/application/jobLogsManager.d.ts.map +0 -1
- package/dist/application/jobLogsManager.js.map +0 -1
- package/dist/application/latencyTracker.d.ts.map +0 -1
- package/dist/application/latencyTracker.js.map +0 -1
- package/dist/application/lockManager.d.ts.map +0 -1
- package/dist/application/lockManager.js.map +0 -1
- package/dist/application/lockOperations.d.ts.map +0 -1
- package/dist/application/lockOperations.js.map +0 -1
- package/dist/application/metricsExporter.d.ts.map +0 -1
- package/dist/application/metricsExporter.js.map +0 -1
- package/dist/application/monitoringChecks.d.ts.map +0 -1
- package/dist/application/monitoringChecks.js.map +0 -1
- package/dist/application/operations/ack.d.ts.map +0 -1
- package/dist/application/operations/ack.js.map +0 -1
- package/dist/application/operations/ackHelpers.d.ts.map +0 -1
- package/dist/application/operations/ackHelpers.js.map +0 -1
- package/dist/application/operations/index.d.ts.map +0 -1
- package/dist/application/operations/index.js.map +0 -1
- package/dist/application/operations/jobManagement.d.ts.map +0 -1
- package/dist/application/operations/jobManagement.js.map +0 -1
- package/dist/application/operations/jobStateTransitions.d.ts.map +0 -1
- package/dist/application/operations/jobStateTransitions.js.map +0 -1
- package/dist/application/operations/pull.d.ts.map +0 -1
- package/dist/application/operations/pull.js.map +0 -1
- package/dist/application/operations/push.d.ts.map +0 -1
- package/dist/application/operations/push.js.map +0 -1
- package/dist/application/operations/queryOperations.d.ts.map +0 -1
- package/dist/application/operations/queryOperations.js.map +0 -1
- package/dist/application/operations/queueControl.d.ts.map +0 -1
- package/dist/application/operations/queueControl.js.map +0 -1
- package/dist/application/queueManager.d.ts.map +0 -1
- package/dist/application/queueManager.js.map +0 -1
- package/dist/application/stallDetection.d.ts.map +0 -1
- package/dist/application/stallDetection.js.map +0 -1
- package/dist/application/statsManager.d.ts.map +0 -1
- package/dist/application/statsManager.js.map +0 -1
- package/dist/application/taskErrorTracking.d.ts.map +0 -1
- package/dist/application/taskErrorTracking.js.map +0 -1
- package/dist/application/throughputTracker.d.ts.map +0 -1
- package/dist/application/throughputTracker.js.map +0 -1
- package/dist/application/types.d.ts.map +0 -1
- package/dist/application/types.js.map +0 -1
- package/dist/application/webhookManager.d.ts.map +0 -1
- package/dist/application/webhookManager.js.map +0 -1
- package/dist/application/workerManager.d.ts.map +0 -1
- package/dist/application/workerManager.js.map +0 -1
- package/dist/cli/client.d.ts.map +0 -1
- package/dist/cli/client.js.map +0 -1
- package/dist/cli/commands/backup.d.ts.map +0 -1
- package/dist/cli/commands/backup.js.map +0 -1
- package/dist/cli/commands/core.d.ts.map +0 -1
- package/dist/cli/commands/core.js.map +0 -1
- package/dist/cli/commands/cron.d.ts.map +0 -1
- package/dist/cli/commands/cron.js.map +0 -1
- package/dist/cli/commands/dlq.d.ts.map +0 -1
- package/dist/cli/commands/dlq.js.map +0 -1
- package/dist/cli/commands/doctor.d.ts.map +0 -1
- package/dist/cli/commands/doctor.js.map +0 -1
- package/dist/cli/commands/job.d.ts.map +0 -1
- package/dist/cli/commands/job.js.map +0 -1
- package/dist/cli/commands/monitor.d.ts.map +0 -1
- package/dist/cli/commands/monitor.js.map +0 -1
- package/dist/cli/commands/queue.d.ts.map +0 -1
- package/dist/cli/commands/queue.js.map +0 -1
- package/dist/cli/commands/rateLimit.d.ts.map +0 -1
- package/dist/cli/commands/rateLimit.js.map +0 -1
- package/dist/cli/commands/server.d.ts.map +0 -1
- package/dist/cli/commands/server.js.map +0 -1
- package/dist/cli/commands/types.d.ts.map +0 -1
- package/dist/cli/commands/types.js.map +0 -1
- package/dist/cli/commands/webhook.d.ts.map +0 -1
- package/dist/cli/commands/webhook.js.map +0 -1
- package/dist/cli/commands/worker.d.ts.map +0 -1
- package/dist/cli/commands/worker.js.map +0 -1
- package/dist/cli/help.d.ts.map +0 -1
- package/dist/cli/help.js.map +0 -1
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/output.d.ts.map +0 -1
- package/dist/cli/output.js.map +0 -1
- package/dist/client/bunqueue/aging.d.ts.map +0 -1
- package/dist/client/bunqueue/aging.js.map +0 -1
- package/dist/client/bunqueue/batch.d.ts.map +0 -1
- package/dist/client/bunqueue/batch.js.map +0 -1
- package/dist/client/bunqueue/cancellation.d.ts.map +0 -1
- package/dist/client/bunqueue/cancellation.js.map +0 -1
- package/dist/client/bunqueue/circuitBreaker.d.ts.map +0 -1
- package/dist/client/bunqueue/circuitBreaker.js.map +0 -1
- package/dist/client/bunqueue/dedupDebounce.d.ts.map +0 -1
- package/dist/client/bunqueue/dedupDebounce.js.map +0 -1
- package/dist/client/bunqueue/dlqRateLimit.d.ts.map +0 -1
- package/dist/client/bunqueue/dlqRateLimit.js.map +0 -1
- package/dist/client/bunqueue/retry.d.ts.map +0 -1
- package/dist/client/bunqueue/retry.js.map +0 -1
- package/dist/client/bunqueue/triggers.d.ts.map +0 -1
- package/dist/client/bunqueue/triggers.js.map +0 -1
- package/dist/client/bunqueue/ttl.d.ts.map +0 -1
- package/dist/client/bunqueue/ttl.js.map +0 -1
- package/dist/client/bunqueue/types.d.ts.map +0 -1
- package/dist/client/bunqueue/types.js.map +0 -1
- package/dist/client/bunqueue.d.ts.map +0 -1
- package/dist/client/bunqueue.js.map +0 -1
- package/dist/client/errors.d.ts.map +0 -1
- package/dist/client/errors.js.map +0 -1
- package/dist/client/events.d.ts.map +0 -1
- package/dist/client/events.js.map +0 -1
- package/dist/client/flow.d.ts.map +0 -1
- package/dist/client/flow.js.map +0 -1
- package/dist/client/flowJobFactory.d.ts.map +0 -1
- package/dist/client/flowJobFactory.js.map +0 -1
- package/dist/client/flowPush.d.ts.map +0 -1
- package/dist/client/flowPush.js.map +0 -1
- package/dist/client/flowTypes.d.ts.map +0 -1
- package/dist/client/flowTypes.js.map +0 -1
- package/dist/client/index.d.ts.map +0 -1
- package/dist/client/index.js.map +0 -1
- package/dist/client/jobConversion.d.ts.map +0 -1
- package/dist/client/jobConversion.js.map +0 -1
- package/dist/client/jobConversionHelpers.d.ts.map +0 -1
- package/dist/client/jobConversionHelpers.js.map +0 -1
- package/dist/client/jobConversionTypes.d.ts.map +0 -1
- package/dist/client/jobConversionTypes.js.map +0 -1
- package/dist/client/jobHelpers.d.ts.map +0 -1
- package/dist/client/jobHelpers.js.map +0 -1
- package/dist/client/manager.d.ts.map +0 -1
- package/dist/client/manager.js.map +0 -1
- package/dist/client/queue/addBatcher.d.ts.map +0 -1
- package/dist/client/queue/addBatcher.js.map +0 -1
- package/dist/client/queue/bullmqCompat.d.ts.map +0 -1
- package/dist/client/queue/bullmqCompat.js.map +0 -1
- package/dist/client/queue/deduplication.d.ts.map +0 -1
- package/dist/client/queue/deduplication.js.map +0 -1
- package/dist/client/queue/dlq.d.ts.map +0 -1
- package/dist/client/queue/dlq.js.map +0 -1
- package/dist/client/queue/dlqOps.d.ts.map +0 -1
- package/dist/client/queue/dlqOps.js.map +0 -1
- package/dist/client/queue/helpers.d.ts.map +0 -1
- package/dist/client/queue/helpers.js.map +0 -1
- package/dist/client/queue/index.d.ts.map +0 -1
- package/dist/client/queue/index.js.map +0 -1
- package/dist/client/queue/jobMove.d.ts.map +0 -1
- package/dist/client/queue/jobMove.js.map +0 -1
- package/dist/client/queue/jobProxy.d.ts.map +0 -1
- package/dist/client/queue/jobProxy.js.map +0 -1
- package/dist/client/queue/operations/add.d.ts.map +0 -1
- package/dist/client/queue/operations/add.js.map +0 -1
- package/dist/client/queue/operations/control.d.ts.map +0 -1
- package/dist/client/queue/operations/control.js.map +0 -1
- package/dist/client/queue/operations/counts.d.ts.map +0 -1
- package/dist/client/queue/operations/counts.js.map +0 -1
- package/dist/client/queue/operations/index.d.ts.map +0 -1
- package/dist/client/queue/operations/index.js.map +0 -1
- package/dist/client/queue/operations/management.d.ts.map +0 -1
- package/dist/client/queue/operations/management.js.map +0 -1
- package/dist/client/queue/operations/query.d.ts.map +0 -1
- package/dist/client/queue/operations/query.js.map +0 -1
- package/dist/client/queue/queue.d.ts.map +0 -1
- package/dist/client/queue/queue.js.map +0 -1
- package/dist/client/queue/queueTypes.d.ts.map +0 -1
- package/dist/client/queue/queueTypes.js.map +0 -1
- package/dist/client/queue/rateLimit.d.ts.map +0 -1
- package/dist/client/queue/rateLimit.js.map +0 -1
- package/dist/client/queue/scheduler.d.ts.map +0 -1
- package/dist/client/queue/scheduler.js.map +0 -1
- package/dist/client/queue/stall.d.ts.map +0 -1
- package/dist/client/queue/stall.js.map +0 -1
- package/dist/client/queue/workers.d.ts.map +0 -1
- package/dist/client/queue/workers.js.map +0 -1
- package/dist/client/queue.d.ts.map +0 -1
- package/dist/client/queue.js.map +0 -1
- package/dist/client/queueGroup.d.ts.map +0 -1
- package/dist/client/queueGroup.js.map +0 -1
- package/dist/client/resolveToken.d.ts.map +0 -1
- package/dist/client/resolveToken.js.map +0 -1
- package/dist/client/sandboxed/index.d.ts.map +0 -1
- package/dist/client/sandboxed/index.js.map +0 -1
- package/dist/client/sandboxed/queueOps.d.ts.map +0 -1
- package/dist/client/sandboxed/queueOps.js.map +0 -1
- package/dist/client/sandboxed/types.d.ts.map +0 -1
- package/dist/client/sandboxed/types.js.map +0 -1
- package/dist/client/sandboxed/worker.d.ts.map +0 -1
- package/dist/client/sandboxed/worker.js.map +0 -1
- package/dist/client/sandboxed/wrapper.d.ts.map +0 -1
- package/dist/client/sandboxed/wrapper.js.map +0 -1
- package/dist/client/sandboxedWorker.d.ts.map +0 -1
- package/dist/client/sandboxedWorker.js.map +0 -1
- package/dist/client/tcp/client.d.ts.map +0 -1
- package/dist/client/tcp/client.js.map +0 -1
- package/dist/client/tcp/connection.d.ts.map +0 -1
- package/dist/client/tcp/connection.js.map +0 -1
- package/dist/client/tcp/health.d.ts.map +0 -1
- package/dist/client/tcp/health.js.map +0 -1
- package/dist/client/tcp/index.d.ts.map +0 -1
- package/dist/client/tcp/index.js.map +0 -1
- package/dist/client/tcp/reconnect.d.ts.map +0 -1
- package/dist/client/tcp/reconnect.js.map +0 -1
- package/dist/client/tcp/shared.d.ts.map +0 -1
- package/dist/client/tcp/shared.js.map +0 -1
- package/dist/client/tcp/types.d.ts.map +0 -1
- package/dist/client/tcp/types.js.map +0 -1
- package/dist/client/tcpClient.d.ts.map +0 -1
- package/dist/client/tcpClient.js.map +0 -1
- package/dist/client/tcpPool.d.ts.map +0 -1
- package/dist/client/tcpPool.js.map +0 -1
- package/dist/client/types.d.ts.map +0 -1
- package/dist/client/types.js.map +0 -1
- package/dist/client/worker/ackBatcher.d.ts.map +0 -1
- package/dist/client/worker/ackBatcher.js.map +0 -1
- package/dist/client/worker/groupConcurrency.d.ts.map +0 -1
- package/dist/client/worker/groupConcurrency.js.map +0 -1
- package/dist/client/worker/index.d.ts.map +0 -1
- package/dist/client/worker/index.js.map +0 -1
- package/dist/client/worker/jobParser.d.ts.map +0 -1
- package/dist/client/worker/jobParser.js.map +0 -1
- package/dist/client/worker/processor.d.ts.map +0 -1
- package/dist/client/worker/processor.js.map +0 -1
- package/dist/client/worker/types.d.ts.map +0 -1
- package/dist/client/worker/types.js.map +0 -1
- package/dist/client/worker/worker.d.ts.map +0 -1
- package/dist/client/worker/worker.js.map +0 -1
- package/dist/client/worker/workerHeartbeat.d.ts.map +0 -1
- package/dist/client/worker/workerHeartbeat.js.map +0 -1
- package/dist/client/worker/workerPull.d.ts.map +0 -1
- package/dist/client/worker/workerPull.js.map +0 -1
- package/dist/client/worker/workerRateLimiter.d.ts.map +0 -1
- package/dist/client/worker/workerRateLimiter.js.map +0 -1
- package/dist/client/worker.d.ts.map +0 -1
- package/dist/client/worker.js.map +0 -1
- package/dist/client/workflow/emitter.d.ts.map +0 -1
- package/dist/client/workflow/emitter.js.map +0 -1
- package/dist/client/workflow/engine.d.ts.map +0 -1
- package/dist/client/workflow/engine.js.map +0 -1
- package/dist/client/workflow/executor.d.ts.map +0 -1
- package/dist/client/workflow/executor.js.map +0 -1
- package/dist/client/workflow/index.d.ts.map +0 -1
- package/dist/client/workflow/index.js.map +0 -1
- package/dist/client/workflow/loops.d.ts.map +0 -1
- package/dist/client/workflow/loops.js.map +0 -1
- package/dist/client/workflow/runner.d.ts.map +0 -1
- package/dist/client/workflow/runner.js.map +0 -1
- package/dist/client/workflow/store.d.ts.map +0 -1
- package/dist/client/workflow/store.js.map +0 -1
- package/dist/client/workflow/types.d.ts.map +0 -1
- package/dist/client/workflow/types.js.map +0 -1
- package/dist/client/workflow/workflow.d.ts.map +0 -1
- package/dist/client/workflow/workflow.js.map +0 -1
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js.map +0 -1
- package/dist/config/loader.d.ts.map +0 -1
- package/dist/config/loader.js.map +0 -1
- package/dist/config/resolve.d.ts.map +0 -1
- package/dist/config/resolve.js.map +0 -1
- package/dist/config/types.d.ts.map +0 -1
- package/dist/config/types.js.map +0 -1
- package/dist/domain/queue/dependencyTracker.d.ts.map +0 -1
- package/dist/domain/queue/dependencyTracker.js.map +0 -1
- package/dist/domain/queue/dlqShard.d.ts.map +0 -1
- package/dist/domain/queue/dlqShard.js.map +0 -1
- package/dist/domain/queue/index.d.ts.map +0 -1
- package/dist/domain/queue/index.js.map +0 -1
- package/dist/domain/queue/limiterManager.d.ts.map +0 -1
- package/dist/domain/queue/limiterManager.js.map +0 -1
- package/dist/domain/queue/priorityQueue.d.ts.map +0 -1
- package/dist/domain/queue/priorityQueue.js.map +0 -1
- package/dist/domain/queue/shard.d.ts.map +0 -1
- package/dist/domain/queue/shard.js.map +0 -1
- package/dist/domain/queue/shardCounters.d.ts.map +0 -1
- package/dist/domain/queue/shardCounters.js.map +0 -1
- package/dist/domain/queue/temporalManager.d.ts.map +0 -1
- package/dist/domain/queue/temporalManager.js.map +0 -1
- package/dist/domain/queue/uniqueKeyManager.d.ts.map +0 -1
- package/dist/domain/queue/uniqueKeyManager.js.map +0 -1
- package/dist/domain/queue/waiterManager.d.ts.map +0 -1
- package/dist/domain/queue/waiterManager.js.map +0 -1
- package/dist/domain/types/command.d.ts.map +0 -1
- package/dist/domain/types/command.js.map +0 -1
- package/dist/domain/types/cron.d.ts.map +0 -1
- package/dist/domain/types/cron.js.map +0 -1
- package/dist/domain/types/deduplication.d.ts.map +0 -1
- package/dist/domain/types/deduplication.js.map +0 -1
- package/dist/domain/types/dlq.d.ts.map +0 -1
- package/dist/domain/types/dlq.js.map +0 -1
- package/dist/domain/types/index.d.ts.map +0 -1
- package/dist/domain/types/index.js.map +0 -1
- package/dist/domain/types/job.d.ts.map +0 -1
- package/dist/domain/types/job.js.map +0 -1
- package/dist/domain/types/queue.d.ts.map +0 -1
- package/dist/domain/types/queue.js.map +0 -1
- package/dist/domain/types/response.d.ts.map +0 -1
- package/dist/domain/types/response.js.map +0 -1
- package/dist/domain/types/stall.d.ts.map +0 -1
- package/dist/domain/types/stall.js.map +0 -1
- package/dist/domain/types/webhook.d.ts.map +0 -1
- package/dist/domain/types/webhook.js.map +0 -1
- package/dist/domain/types/worker.d.ts.map +0 -1
- package/dist/domain/types/worker.js.map +0 -1
- package/dist/infrastructure/backup/index.d.ts.map +0 -1
- package/dist/infrastructure/backup/index.js.map +0 -1
- package/dist/infrastructure/backup/s3Backup.d.ts.map +0 -1
- package/dist/infrastructure/backup/s3Backup.js.map +0 -1
- package/dist/infrastructure/backup/s3BackupConfig.d.ts.map +0 -1
- package/dist/infrastructure/backup/s3BackupConfig.js.map +0 -1
- package/dist/infrastructure/backup/s3BackupOperations.d.ts.map +0 -1
- package/dist/infrastructure/backup/s3BackupOperations.js.map +0 -1
- package/dist/infrastructure/cloud/buffer.d.ts.map +0 -1
- package/dist/infrastructure/cloud/buffer.js.map +0 -1
- package/dist/infrastructure/cloud/circuitBreaker.d.ts.map +0 -1
- package/dist/infrastructure/cloud/circuitBreaker.js.map +0 -1
- package/dist/infrastructure/cloud/cloudAgent 2.d.ts +0 -55
- package/dist/infrastructure/cloud/cloudAgent 2.d.ts.map +0 -1
- package/dist/infrastructure/cloud/cloudAgent 2.js +0 -243
- package/dist/infrastructure/cloud/cloudAgent 2.js.map +0 -1
- package/dist/infrastructure/cloud/cloudAgent.d.ts.map +0 -1
- package/dist/infrastructure/cloud/cloudAgent.js.map +0 -1
- package/dist/infrastructure/cloud/commandHandler 2.d.ts +0 -52
- package/dist/infrastructure/cloud/commandHandler 2.d.ts.map +0 -1
- package/dist/infrastructure/cloud/commandHandler 2.js +0 -84
- package/dist/infrastructure/cloud/commandHandler 2.js.map +0 -1
- package/dist/infrastructure/cloud/commandHandler.d.ts.map +0 -1
- package/dist/infrastructure/cloud/commandHandler.js.map +0 -1
- package/dist/infrastructure/cloud/commands 2.d.ts +0 -11
- package/dist/infrastructure/cloud/commands 2.d.ts.map +0 -1
- package/dist/infrastructure/cloud/commands 2.js +0 -343
- package/dist/infrastructure/cloud/commands 2.js.map +0 -1
- package/dist/infrastructure/cloud/commands.d.ts.map +0 -1
- package/dist/infrastructure/cloud/commands.js.map +0 -1
- package/dist/infrastructure/cloud/config.d.ts.map +0 -1
- package/dist/infrastructure/cloud/config.js.map +0 -1
- package/dist/infrastructure/cloud/httpSender.d.ts.map +0 -1
- package/dist/infrastructure/cloud/httpSender.js.map +0 -1
- package/dist/infrastructure/cloud/index.d.ts.map +0 -1
- package/dist/infrastructure/cloud/index.js.map +0 -1
- package/dist/infrastructure/cloud/instanceId.d.ts +0 -7
- package/dist/infrastructure/cloud/instanceId.d.ts.map +0 -1
- package/dist/infrastructure/cloud/instanceId.js +0 -34
- package/dist/infrastructure/cloud/instanceId.js.map +0 -1
- package/dist/infrastructure/cloud/logger.d.ts.map +0 -1
- package/dist/infrastructure/cloud/logger.js.map +0 -1
- package/dist/infrastructure/cloud/snapshotCollector.d.ts.map +0 -1
- package/dist/infrastructure/cloud/snapshotCollector.js.map +0 -1
- package/dist/infrastructure/cloud/snapshotHelpers.d.ts.map +0 -1
- package/dist/infrastructure/cloud/snapshotHelpers.js.map +0 -1
- package/dist/infrastructure/cloud/statsRefresh.d.ts.map +0 -1
- package/dist/infrastructure/cloud/statsRefresh.js.map +0 -1
- package/dist/infrastructure/cloud/statsUpdate.d.ts.map +0 -1
- package/dist/infrastructure/cloud/statsUpdate.js.map +0 -1
- package/dist/infrastructure/cloud/types.d.ts.map +0 -1
- package/dist/infrastructure/cloud/types.js.map +0 -1
- package/dist/infrastructure/cloud/wsSender.d.ts.map +0 -1
- package/dist/infrastructure/cloud/wsSender.js.map +0 -1
- package/dist/infrastructure/persistence/index.d.ts.map +0 -1
- package/dist/infrastructure/persistence/index.js.map +0 -1
- package/dist/infrastructure/persistence/schema.d.ts.map +0 -1
- package/dist/infrastructure/persistence/schema.js.map +0 -1
- package/dist/infrastructure/persistence/sqlite.d.ts.map +0 -1
- package/dist/infrastructure/persistence/sqlite.js.map +0 -1
- package/dist/infrastructure/persistence/sqliteBatch.d.ts.map +0 -1
- package/dist/infrastructure/persistence/sqliteBatch.js.map +0 -1
- package/dist/infrastructure/persistence/sqliteSerializer.d.ts.map +0 -1
- package/dist/infrastructure/persistence/sqliteSerializer.js.map +0 -1
- package/dist/infrastructure/persistence/statements.d.ts.map +0 -1
- package/dist/infrastructure/persistence/statements.js.map +0 -1
- package/dist/infrastructure/scheduler/cronParser.d.ts.map +0 -1
- package/dist/infrastructure/scheduler/cronParser.js.map +0 -1
- package/dist/infrastructure/scheduler/cronScheduler.d.ts.map +0 -1
- package/dist/infrastructure/scheduler/cronScheduler.js.map +0 -1
- package/dist/infrastructure/scheduler/index.d.ts.map +0 -1
- package/dist/infrastructure/scheduler/index.js.map +0 -1
- package/dist/infrastructure/server/handler.d.ts.map +0 -1
- package/dist/infrastructure/server/handler.js.map +0 -1
- package/dist/infrastructure/server/handlerRoutes.d.ts.map +0 -1
- package/dist/infrastructure/server/handlerRoutes.js.map +0 -1
- package/dist/infrastructure/server/handlers/advanced.d.ts.map +0 -1
- package/dist/infrastructure/server/handlers/advanced.js.map +0 -1
- package/dist/infrastructure/server/handlers/core.d.ts.map +0 -1
- package/dist/infrastructure/server/handlers/core.js.map +0 -1
- package/dist/infrastructure/server/handlers/cron.d.ts.map +0 -1
- package/dist/infrastructure/server/handlers/cron.js.map +0 -1
- package/dist/infrastructure/server/handlers/dashboard.d.ts.map +0 -1
- package/dist/infrastructure/server/handlers/dashboard.js.map +0 -1
- package/dist/infrastructure/server/handlers/dlq.d.ts.map +0 -1
- package/dist/infrastructure/server/handlers/dlq.js.map +0 -1
- package/dist/infrastructure/server/handlers/index.d.ts.map +0 -1
- package/dist/infrastructure/server/handlers/index.js.map +0 -1
- package/dist/infrastructure/server/handlers/management.d.ts.map +0 -1
- package/dist/infrastructure/server/handlers/management.js.map +0 -1
- package/dist/infrastructure/server/handlers/monitoring.d.ts.map +0 -1
- package/dist/infrastructure/server/handlers/monitoring.js.map +0 -1
- package/dist/infrastructure/server/handlers/query.d.ts.map +0 -1
- package/dist/infrastructure/server/handlers/query.js.map +0 -1
- package/dist/infrastructure/server/http.d.ts.map +0 -1
- package/dist/infrastructure/server/http.js.map +0 -1
- package/dist/infrastructure/server/httpEndpoints.d.ts.map +0 -1
- package/dist/infrastructure/server/httpEndpoints.js.map +0 -1
- package/dist/infrastructure/server/httpRouteJobs.d.ts.map +0 -1
- package/dist/infrastructure/server/httpRouteJobs.js.map +0 -1
- package/dist/infrastructure/server/httpRouteQueueConfig.d.ts.map +0 -1
- package/dist/infrastructure/server/httpRouteQueueConfig.js.map +0 -1
- package/dist/infrastructure/server/httpRouteQueues.d.ts.map +0 -1
- package/dist/infrastructure/server/httpRouteQueues.js.map +0 -1
- package/dist/infrastructure/server/httpRouteResources.d.ts.map +0 -1
- package/dist/infrastructure/server/httpRouteResources.js.map +0 -1
- package/dist/infrastructure/server/index.d.ts.map +0 -1
- package/dist/infrastructure/server/index.js.map +0 -1
- package/dist/infrastructure/server/protocol.d.ts.map +0 -1
- package/dist/infrastructure/server/protocol.js.map +0 -1
- package/dist/infrastructure/server/rateLimiter.d.ts.map +0 -1
- package/dist/infrastructure/server/rateLimiter.js.map +0 -1
- package/dist/infrastructure/server/sseHandler.d.ts.map +0 -1
- package/dist/infrastructure/server/sseHandler.js.map +0 -1
- package/dist/infrastructure/server/tcp.d.ts.map +0 -1
- package/dist/infrastructure/server/tcp.js.map +0 -1
- package/dist/infrastructure/server/types.d.ts.map +0 -1
- package/dist/infrastructure/server/types.js.map +0 -1
- package/dist/infrastructure/server/wsHandler.d.ts.map +0 -1
- package/dist/infrastructure/server/wsHandler.js.map +0 -1
- package/dist/main.d.ts.map +0 -1
- package/dist/main.js.map +0 -1
- package/dist/mcp/adapter.d.ts.map +0 -1
- package/dist/mcp/adapter.js.map +0 -1
- package/dist/mcp/httpHandler.d.ts.map +0 -1
- package/dist/mcp/httpHandler.js.map +0 -1
- package/dist/mcp/index.d.ts.map +0 -1
- package/dist/mcp/index.js.map +0 -1
- package/dist/mcp/mcpHandlers.d.ts +0 -129
- package/dist/mcp/mcpHandlers.d.ts.map +0 -1
- package/dist/mcp/mcpHandlers.js +0 -204
- package/dist/mcp/mcpHandlers.js.map +0 -1
- package/dist/mcp/mcpTools.d.ts +0 -15
- package/dist/mcp/mcpTools.d.ts.map +0 -1
- package/dist/mcp/mcpTools.js +0 -277
- package/dist/mcp/mcpTools.js.map +0 -1
- package/dist/mcp/prompts.d.ts.map +0 -1
- package/dist/mcp/prompts.js.map +0 -1
- package/dist/mcp/resources.d.ts.map +0 -1
- package/dist/mcp/resources.js.map +0 -1
- package/dist/mcp/tools/consumptionTools.d.ts.map +0 -1
- package/dist/mcp/tools/consumptionTools.js.map +0 -1
- package/dist/mcp/tools/cronTools.d.ts.map +0 -1
- package/dist/mcp/tools/cronTools.js.map +0 -1
- package/dist/mcp/tools/dlqTools.d.ts.map +0 -1
- package/dist/mcp/tools/dlqTools.js.map +0 -1
- package/dist/mcp/tools/flowTools.d.ts.map +0 -1
- package/dist/mcp/tools/flowTools.js.map +0 -1
- package/dist/mcp/tools/handlerTools.d.ts.map +0 -1
- package/dist/mcp/tools/handlerTools.js.map +0 -1
- package/dist/mcp/tools/jobMgmtTools.d.ts.map +0 -1
- package/dist/mcp/tools/jobMgmtTools.js.map +0 -1
- package/dist/mcp/tools/jobTools.d.ts.map +0 -1
- package/dist/mcp/tools/jobTools.js.map +0 -1
- package/dist/mcp/tools/mcpTracker.d.ts.map +0 -1
- package/dist/mcp/tools/mcpTracker.js.map +0 -1
- package/dist/mcp/tools/monitoringTools.d.ts.map +0 -1
- package/dist/mcp/tools/monitoringTools.js.map +0 -1
- package/dist/mcp/tools/queueTools.d.ts.map +0 -1
- package/dist/mcp/tools/queueTools.js.map +0 -1
- package/dist/mcp/tools/rateLimitTools.d.ts.map +0 -1
- package/dist/mcp/tools/rateLimitTools.js.map +0 -1
- package/dist/mcp/tools/webhookTools.d.ts.map +0 -1
- package/dist/mcp/tools/webhookTools.js.map +0 -1
- package/dist/mcp/tools/withErrorHandler.d.ts.map +0 -1
- package/dist/mcp/tools/withErrorHandler.js.map +0 -1
- package/dist/mcp/tools/workerMgmtTools.d.ts.map +0 -1
- package/dist/mcp/tools/workerMgmtTools.js.map +0 -1
- package/dist/shared/boundedMap.d.ts.map +0 -1
- package/dist/shared/boundedMap.js.map +0 -1
- package/dist/shared/boundedSet.d.ts.map +0 -1
- package/dist/shared/boundedSet.js.map +0 -1
- package/dist/shared/hash.d.ts.map +0 -1
- package/dist/shared/hash.js.map +0 -1
- package/dist/shared/histogram.d.ts.map +0 -1
- package/dist/shared/histogram.js.map +0 -1
- package/dist/shared/index.d.ts.map +0 -1
- package/dist/shared/index.js.map +0 -1
- package/dist/shared/lock.d.ts.map +0 -1
- package/dist/shared/lock.js.map +0 -1
- package/dist/shared/logger.d.ts.map +0 -1
- package/dist/shared/logger.js.map +0 -1
- package/dist/shared/lru.d.ts.map +0 -1
- package/dist/shared/lru.js.map +0 -1
- package/dist/shared/lruMap.d.ts.map +0 -1
- package/dist/shared/lruMap.js.map +0 -1
- package/dist/shared/lruSet.d.ts.map +0 -1
- package/dist/shared/lruSet.js.map +0 -1
- package/dist/shared/minHeap.d.ts.map +0 -1
- package/dist/shared/minHeap.js.map +0 -1
- package/dist/shared/semaphore.d.ts.map +0 -1
- package/dist/shared/semaphore.js.map +0 -1
- package/dist/shared/serialization.d.ts.map +0 -1
- package/dist/shared/serialization.js.map +0 -1
- package/dist/shared/skipList.d.ts.map +0 -1
- package/dist/shared/skipList.js.map +0 -1
- package/dist/shared/ttlMap.d.ts.map +0 -1
- package/dist/shared/ttlMap.js.map +0 -1
- package/dist/shared/version.d.ts.map +0 -1
- package/dist/shared/version.js.map +0 -1
- package/dist/shared/webhookValidation.d.ts.map +0 -1
- package/dist/shared/webhookValidation.js.map +0 -1
|
@@ -2,10 +2,28 @@
|
|
|
2
2
|
* Job Proxy
|
|
3
3
|
* Creates Job objects with methods for TCP and embedded modes
|
|
4
4
|
*/
|
|
5
|
+
import { getSharedManager } from '../manager';
|
|
6
|
+
import { jobId } from '../../domain/types/job';
|
|
7
|
+
function reflectFields(id, queueName, meta) {
|
|
8
|
+
const opts = meta?.opts ?? {};
|
|
9
|
+
const p = opts.parent;
|
|
10
|
+
const repeat = opts.repeat;
|
|
11
|
+
const pattern = repeat?.pattern ?? (repeat?.every ? `every:${repeat.every}` : '');
|
|
12
|
+
return {
|
|
13
|
+
delay: meta?.delay ?? 0,
|
|
14
|
+
priority: meta?.priority ?? 0,
|
|
15
|
+
opts,
|
|
16
|
+
deduplicationId: opts.jobId ?? opts.deduplication?.id,
|
|
17
|
+
parentKey: p ? `${p.queue}:${p.id}` : undefined,
|
|
18
|
+
parent: p ? { id: p.id, queueQualifiedName: p.queue } : undefined,
|
|
19
|
+
repeatJobKey: repeat ? `${queueName}:${id}:${pattern}` : undefined,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
5
22
|
/** Create a full Job proxy with TCP methods */
|
|
6
|
-
export function createJobProxy(id, name, data, ctx) {
|
|
23
|
+
export function createJobProxy(id, name, data, ctx, meta) {
|
|
7
24
|
const { tcp, queueName } = ctx;
|
|
8
|
-
const ts = Date.now();
|
|
25
|
+
const ts = meta?.timestamp ?? Date.now();
|
|
26
|
+
const r = reflectFields(id, queueName, meta);
|
|
9
27
|
return {
|
|
10
28
|
id,
|
|
11
29
|
name,
|
|
@@ -14,18 +32,19 @@ export function createJobProxy(id, name, data, ctx) {
|
|
|
14
32
|
attemptsMade: 0,
|
|
15
33
|
timestamp: ts,
|
|
16
34
|
progress: 0,
|
|
17
|
-
delay:
|
|
35
|
+
delay: r.delay,
|
|
18
36
|
processedOn: undefined,
|
|
19
37
|
finishedOn: undefined,
|
|
20
38
|
stacktrace: null,
|
|
21
39
|
stalledCounter: 0,
|
|
22
|
-
priority:
|
|
23
|
-
|
|
24
|
-
|
|
40
|
+
priority: r.priority,
|
|
41
|
+
parent: r.parent,
|
|
42
|
+
parentKey: r.parentKey,
|
|
43
|
+
opts: r.opts,
|
|
25
44
|
token: undefined,
|
|
26
45
|
processedBy: undefined,
|
|
27
|
-
deduplicationId:
|
|
28
|
-
repeatJobKey:
|
|
46
|
+
deduplicationId: r.deduplicationId,
|
|
47
|
+
repeatJobKey: r.repeatJobKey,
|
|
29
48
|
attemptsStarted: 0,
|
|
30
49
|
// Methods
|
|
31
50
|
updateProgress: async (progress, message) => {
|
|
@@ -44,7 +63,7 @@ export function createJobProxy(id, name, data, ctx) {
|
|
|
44
63
|
isDelayed: async () => (await ctx.getJobState(id)) === 'delayed',
|
|
45
64
|
isCompleted: async () => (await ctx.getJobState(id)) === 'completed',
|
|
46
65
|
isFailed: async () => (await ctx.getJobState(id)) === 'failed',
|
|
47
|
-
isWaitingChildren: () =>
|
|
66
|
+
isWaitingChildren: async () => (await ctx.getJobState(id)) === 'waiting-children',
|
|
48
67
|
// Mutation methods
|
|
49
68
|
updateData: async (newData) => {
|
|
50
69
|
await tcp.send({ cmd: 'Update', id, data: newData });
|
|
@@ -56,41 +75,49 @@ export function createJobProxy(id, name, data, ctx) {
|
|
|
56
75
|
await tcp.send({ cmd: 'ChangeDelay', id, delay });
|
|
57
76
|
},
|
|
58
77
|
changePriority: async (opts) => {
|
|
59
|
-
await tcp.send({ cmd: 'ChangePriority', id, priority: opts.priority });
|
|
78
|
+
await tcp.send({ cmd: 'ChangePriority', id, priority: opts.priority, lifo: opts.lifo });
|
|
60
79
|
},
|
|
61
|
-
extendLock: async (
|
|
62
|
-
const res = await tcp.send({ cmd: 'ExtendLock', id, duration });
|
|
63
|
-
return res.ok ? duration : 0;
|
|
80
|
+
extendLock: async (token, duration) => {
|
|
81
|
+
const res = await tcp.send({ cmd: 'ExtendLock', id, token, duration });
|
|
82
|
+
return res.ok === true ? duration : 0;
|
|
64
83
|
},
|
|
65
84
|
clearLogs: async () => {
|
|
66
85
|
await tcp.send({ cmd: 'ClearLogs', id });
|
|
67
86
|
},
|
|
68
|
-
// Dependency methods
|
|
69
|
-
getDependencies: () =>
|
|
70
|
-
getDependenciesCount: () =>
|
|
87
|
+
// Dependency methods — derive from child state queries since no dedicated API
|
|
88
|
+
getDependencies: () => computeDependencies(id, queueName, tcp),
|
|
89
|
+
getDependenciesCount: async () => {
|
|
90
|
+
const deps = await computeDependencies(id, queueName, tcp);
|
|
91
|
+
return {
|
|
92
|
+
processed: Object.keys(deps.processed).length,
|
|
93
|
+
unprocessed: deps.unprocessed.length,
|
|
94
|
+
};
|
|
95
|
+
},
|
|
71
96
|
// Serialization methods
|
|
72
97
|
toJSON: () => ({
|
|
73
98
|
id,
|
|
74
99
|
name,
|
|
75
100
|
data,
|
|
76
|
-
opts:
|
|
101
|
+
opts: r.opts,
|
|
77
102
|
progress: 0,
|
|
78
|
-
delay:
|
|
103
|
+
delay: r.delay,
|
|
79
104
|
timestamp: ts,
|
|
80
105
|
attemptsMade: 0,
|
|
81
106
|
stacktrace: null,
|
|
82
107
|
queueQualifiedName: `bull:${queueName}`,
|
|
108
|
+
parentKey: r.parentKey,
|
|
83
109
|
}),
|
|
84
110
|
asJSON: () => ({
|
|
85
111
|
id,
|
|
86
112
|
name,
|
|
87
113
|
data: JSON.stringify(data),
|
|
88
|
-
opts:
|
|
114
|
+
opts: JSON.stringify(r.opts),
|
|
89
115
|
progress: '0',
|
|
90
|
-
delay:
|
|
116
|
+
delay: String(r.delay),
|
|
91
117
|
timestamp: String(ts),
|
|
92
118
|
attemptsMade: '0',
|
|
93
119
|
stacktrace: null,
|
|
120
|
+
parentKey: r.parentKey,
|
|
94
121
|
}),
|
|
95
122
|
// Move methods
|
|
96
123
|
moveToCompleted: async (returnValue) => {
|
|
@@ -105,12 +132,24 @@ export function createJobProxy(id, name, data, ctx) {
|
|
|
105
132
|
return res.ok === true;
|
|
106
133
|
},
|
|
107
134
|
moveToDelayed: async (timestamp) => {
|
|
108
|
-
|
|
135
|
+
const delay = Math.max(0, timestamp - Date.now());
|
|
136
|
+
await tcp.send({ cmd: 'MoveToDelayed', id, delay });
|
|
137
|
+
},
|
|
138
|
+
moveToWaitingChildren: () => {
|
|
139
|
+
return Promise.reject(new Error('moveToWaitingChildren is not supported in TCP mode — no server command available'));
|
|
140
|
+
},
|
|
141
|
+
waitUntilFinished: async (_queueEvents, ttl) => {
|
|
142
|
+
const timeout = ttl ?? 30000;
|
|
143
|
+
const res = await tcp.send({ cmd: 'WaitJob', id, timeout });
|
|
144
|
+
const typed = res;
|
|
145
|
+
if (!typed.completed)
|
|
146
|
+
throw new Error(`waitUntilFinished timed out after ${timeout}ms`);
|
|
147
|
+
return typed.result;
|
|
109
148
|
},
|
|
110
|
-
moveToWaitingChildren: () => Promise.resolve(false),
|
|
111
|
-
waitUntilFinished: () => Promise.resolve(undefined),
|
|
112
149
|
// Additional methods
|
|
113
|
-
discard: () => {
|
|
150
|
+
discard: () => {
|
|
151
|
+
void tcp.send({ cmd: 'Discard', id });
|
|
152
|
+
},
|
|
114
153
|
getFailedChildrenValues: async () => {
|
|
115
154
|
const res = await tcp.send({ cmd: 'GetFailedChildrenValues', id });
|
|
116
155
|
return res.values ?? {};
|
|
@@ -123,15 +162,45 @@ export function createJobProxy(id, name, data, ctx) {
|
|
|
123
162
|
const res = await tcp.send({ cmd: 'RemoveChildDependency', id });
|
|
124
163
|
return res.removed ?? false;
|
|
125
164
|
},
|
|
126
|
-
removeDeduplicationKey: () => Promise.
|
|
165
|
+
removeDeduplicationKey: () => Promise.reject(new Error('removeDeduplicationKey is not implemented — no server primitive available')),
|
|
127
166
|
removeUnprocessedChildren: async () => {
|
|
128
167
|
await tcp.send({ cmd: 'RemoveUnprocessedChildren', id });
|
|
129
168
|
},
|
|
130
169
|
};
|
|
131
170
|
}
|
|
132
|
-
/**
|
|
171
|
+
/** Fetch child ids for a job via GetJob, then derive dependency state per child */
|
|
172
|
+
async function computeDependencies(id, queueName, tcp) {
|
|
173
|
+
const jobRes = await tcp.send({ cmd: 'GetJob', id });
|
|
174
|
+
const parent = jobRes.job;
|
|
175
|
+
const childIds = parent?.childrenIds ?? [];
|
|
176
|
+
const processed = {};
|
|
177
|
+
const unprocessed = [];
|
|
178
|
+
for (const cid of childIds) {
|
|
179
|
+
const stateRes = await tcp.send({ cmd: 'GetState', id: cid });
|
|
180
|
+
const state = stateRes.state ?? 'unknown';
|
|
181
|
+
const key = `${queueName}:${cid}`;
|
|
182
|
+
if (state === 'completed' || state === 'failed') {
|
|
183
|
+
if (state === 'completed') {
|
|
184
|
+
const resR = await tcp.send({ cmd: 'GetResult', id: cid });
|
|
185
|
+
processed[key] = resR.result ?? null;
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
processed[key] = null;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
unprocessed.push(key);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
return { processed, unprocessed };
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Create a simple Job with all BullMQ v5 methods wired.
|
|
199
|
+
* Used by Queue.getJob / getJobs in both embedded and TCP modes.
|
|
200
|
+
*/
|
|
133
201
|
export function createSimpleJob(id, name, data, timestamp, ctx) {
|
|
134
|
-
const { queueName } = ctx;
|
|
202
|
+
const { queueName, embedded, tcp, meta } = ctx;
|
|
203
|
+
const r = reflectFields(id, queueName, meta);
|
|
135
204
|
return {
|
|
136
205
|
id,
|
|
137
206
|
name,
|
|
@@ -140,22 +209,36 @@ export function createSimpleJob(id, name, data, timestamp, ctx) {
|
|
|
140
209
|
attemptsMade: 0,
|
|
141
210
|
timestamp,
|
|
142
211
|
progress: 0,
|
|
143
|
-
delay:
|
|
212
|
+
delay: r.delay,
|
|
144
213
|
processedOn: undefined,
|
|
145
214
|
finishedOn: undefined,
|
|
146
215
|
stacktrace: null,
|
|
147
216
|
stalledCounter: 0,
|
|
148
|
-
priority:
|
|
149
|
-
|
|
150
|
-
|
|
217
|
+
priority: r.priority,
|
|
218
|
+
parent: r.parent,
|
|
219
|
+
parentKey: r.parentKey,
|
|
220
|
+
opts: r.opts,
|
|
151
221
|
token: undefined,
|
|
152
222
|
processedBy: undefined,
|
|
153
|
-
deduplicationId:
|
|
154
|
-
repeatJobKey:
|
|
223
|
+
deduplicationId: r.deduplicationId,
|
|
224
|
+
repeatJobKey: r.repeatJobKey,
|
|
155
225
|
attemptsStarted: 0,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
226
|
+
updateProgress: async (progress, message) => {
|
|
227
|
+
if (embedded) {
|
|
228
|
+
await getSharedManager().updateProgress(jobId(id), progress, message);
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
if (tcp)
|
|
232
|
+
await tcp.send({ cmd: 'Progress', id, progress, message });
|
|
233
|
+
},
|
|
234
|
+
log: async (message) => {
|
|
235
|
+
if (embedded) {
|
|
236
|
+
getSharedManager().addLog(jobId(id), message);
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
if (tcp)
|
|
240
|
+
await tcp.send({ cmd: 'AddLog', id, message });
|
|
241
|
+
},
|
|
159
242
|
getState: () => ctx.getJobState(id),
|
|
160
243
|
remove: () => ctx.removeAsync(id),
|
|
161
244
|
retry: () => ctx.retryJob(id),
|
|
@@ -166,55 +249,252 @@ export function createSimpleJob(id, name, data, timestamp, ctx) {
|
|
|
166
249
|
isDelayed: async () => (await ctx.getJobState(id)) === 'delayed',
|
|
167
250
|
isCompleted: async () => (await ctx.getJobState(id)) === 'completed',
|
|
168
251
|
isFailed: async () => (await ctx.getJobState(id)) === 'failed',
|
|
169
|
-
isWaitingChildren: () =>
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
252
|
+
isWaitingChildren: async () => (await ctx.getJobState(id)) === 'waiting-children',
|
|
253
|
+
updateData: async (newData) => {
|
|
254
|
+
if (embedded) {
|
|
255
|
+
await getSharedManager().updateJobData(jobId(id), newData);
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
if (tcp)
|
|
259
|
+
await tcp.send({ cmd: 'Update', id, data: newData });
|
|
260
|
+
},
|
|
261
|
+
promote: async () => {
|
|
262
|
+
if (embedded) {
|
|
263
|
+
await getSharedManager().promote(jobId(id));
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
if (tcp)
|
|
267
|
+
await tcp.send({ cmd: 'Promote', id });
|
|
268
|
+
},
|
|
269
|
+
changeDelay: async (delay) => {
|
|
270
|
+
if (embedded) {
|
|
271
|
+
await getSharedManager().changeDelay(jobId(id), delay);
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
if (tcp)
|
|
275
|
+
await tcp.send({ cmd: 'ChangeDelay', id, delay });
|
|
276
|
+
},
|
|
277
|
+
changePriority: async (opts) => {
|
|
278
|
+
if (embedded) {
|
|
279
|
+
await getSharedManager().changePriority(jobId(id), opts.priority, opts.lifo);
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
if (tcp) {
|
|
283
|
+
await tcp.send({ cmd: 'ChangePriority', id, priority: opts.priority, lifo: opts.lifo });
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
extendLock: async (token, duration) => {
|
|
287
|
+
if (embedded) {
|
|
288
|
+
const ok = await getSharedManager().extendLock(jobId(id), token, duration);
|
|
289
|
+
return ok ? duration : 0;
|
|
290
|
+
}
|
|
291
|
+
if (!tcp)
|
|
292
|
+
return 0;
|
|
293
|
+
const res = await tcp.send({ cmd: 'ExtendLock', id, token, duration });
|
|
294
|
+
return res.ok === true ? duration : 0;
|
|
295
|
+
},
|
|
296
|
+
clearLogs: async (keepLogs) => {
|
|
297
|
+
if (embedded) {
|
|
298
|
+
getSharedManager().clearLogs(jobId(id), keepLogs);
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
if (tcp)
|
|
302
|
+
await tcp.send({ cmd: 'ClearLogs', id, keepLogs });
|
|
303
|
+
},
|
|
304
|
+
getDependencies: () => computeDepsSimple(id, queueName, embedded, tcp),
|
|
305
|
+
getDependenciesCount: async () => {
|
|
306
|
+
const deps = await computeDepsSimple(id, queueName, embedded, tcp);
|
|
307
|
+
return {
|
|
308
|
+
processed: Object.keys(deps.processed).length,
|
|
309
|
+
unprocessed: deps.unprocessed.length,
|
|
310
|
+
};
|
|
311
|
+
},
|
|
181
312
|
toJSON: () => ({
|
|
182
313
|
id,
|
|
183
314
|
name,
|
|
184
315
|
data,
|
|
185
|
-
opts:
|
|
316
|
+
opts: r.opts,
|
|
186
317
|
progress: 0,
|
|
187
|
-
delay:
|
|
318
|
+
delay: r.delay,
|
|
188
319
|
timestamp,
|
|
189
320
|
attemptsMade: 0,
|
|
190
321
|
stacktrace: null,
|
|
191
322
|
queueQualifiedName: `bull:${queueName}`,
|
|
323
|
+
parentKey: r.parentKey,
|
|
192
324
|
}),
|
|
193
325
|
asJSON: () => ({
|
|
194
326
|
id,
|
|
195
327
|
name,
|
|
196
328
|
data: JSON.stringify(data),
|
|
197
|
-
opts:
|
|
329
|
+
opts: JSON.stringify(r.opts),
|
|
198
330
|
progress: '0',
|
|
199
|
-
delay:
|
|
331
|
+
delay: String(r.delay),
|
|
200
332
|
timestamp: String(timestamp),
|
|
201
333
|
attemptsMade: '0',
|
|
202
334
|
stacktrace: null,
|
|
335
|
+
parentKey: r.parentKey,
|
|
203
336
|
}),
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
337
|
+
moveToCompleted: async (returnValue) => {
|
|
338
|
+
if (embedded) {
|
|
339
|
+
await getSharedManager().ack(jobId(id), returnValue);
|
|
340
|
+
return null;
|
|
341
|
+
}
|
|
342
|
+
if (tcp)
|
|
343
|
+
await tcp.send({ cmd: 'ACK', id, result: returnValue });
|
|
344
|
+
return null;
|
|
345
|
+
},
|
|
346
|
+
moveToFailed: async (error) => {
|
|
347
|
+
if (embedded) {
|
|
348
|
+
await getSharedManager().fail(jobId(id), error.message);
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
if (tcp)
|
|
352
|
+
await tcp.send({ cmd: 'FAIL', id, error: error.message });
|
|
353
|
+
},
|
|
354
|
+
moveToWait: async () => {
|
|
355
|
+
if (embedded) {
|
|
356
|
+
const mgr = getSharedManager();
|
|
357
|
+
const state = await mgr.getJobState(jobId(id));
|
|
358
|
+
if (state === 'active')
|
|
359
|
+
return await mgr.moveActiveToWait(jobId(id));
|
|
360
|
+
if (state === 'delayed')
|
|
361
|
+
return await mgr.promote(jobId(id));
|
|
362
|
+
if (state === 'failed') {
|
|
363
|
+
const job = await mgr.getJob(jobId(id));
|
|
364
|
+
if (!job)
|
|
365
|
+
return false;
|
|
366
|
+
return mgr.retryDlq(job.queue, jobId(id)) > 0;
|
|
367
|
+
}
|
|
368
|
+
if (state === 'waiting' || state === 'prioritized')
|
|
369
|
+
return true;
|
|
370
|
+
return false;
|
|
371
|
+
}
|
|
372
|
+
if (!tcp)
|
|
373
|
+
return false;
|
|
374
|
+
const res = await tcp.send({ cmd: 'MoveToWait', id });
|
|
375
|
+
return res.ok === true;
|
|
376
|
+
},
|
|
377
|
+
moveToDelayed: async (ts) => {
|
|
378
|
+
const delay = Math.max(0, ts - Date.now());
|
|
379
|
+
if (embedded) {
|
|
380
|
+
await getSharedManager().moveToDelayed(jobId(id), delay);
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
if (tcp)
|
|
384
|
+
await tcp.send({ cmd: 'MoveToDelayed', id, delay });
|
|
385
|
+
},
|
|
386
|
+
moveToWaitingChildren: async () => {
|
|
387
|
+
if (embedded) {
|
|
388
|
+
return await getSharedManager().moveToWaitingChildren(jobId(id));
|
|
389
|
+
}
|
|
390
|
+
throw new Error('moveToWaitingChildren is not supported in TCP mode — no server command available');
|
|
391
|
+
},
|
|
392
|
+
waitUntilFinished: async (_qe, ttl) => {
|
|
393
|
+
const timeout = ttl ?? 30000;
|
|
394
|
+
if (embedded) {
|
|
395
|
+
const mgr = getSharedManager();
|
|
396
|
+
const job = await mgr.getJob(jobId(id));
|
|
397
|
+
if (!job)
|
|
398
|
+
throw new Error(`Job ${id} not found`);
|
|
399
|
+
if (job.completedAt)
|
|
400
|
+
return mgr.getResult(jobId(id));
|
|
401
|
+
const ok = await mgr.waitForJobCompletion(jobId(id), timeout);
|
|
402
|
+
if (!ok)
|
|
403
|
+
throw new Error(`waitUntilFinished timed out after ${timeout}ms`);
|
|
404
|
+
return mgr.getResult(jobId(id));
|
|
405
|
+
}
|
|
406
|
+
if (!tcp)
|
|
407
|
+
throw new Error('waitUntilFinished: no connection');
|
|
408
|
+
const res = await tcp.send({ cmd: 'WaitJob', id, timeout });
|
|
409
|
+
const typed = res;
|
|
410
|
+
if (!typed.completed)
|
|
411
|
+
throw new Error(`waitUntilFinished timed out after ${timeout}ms`);
|
|
412
|
+
return typed.result;
|
|
413
|
+
},
|
|
414
|
+
discard: () => {
|
|
415
|
+
if (embedded) {
|
|
416
|
+
void getSharedManager().discard(jobId(id));
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
if (tcp)
|
|
420
|
+
void tcp.send({ cmd: 'Discard', id });
|
|
421
|
+
},
|
|
422
|
+
getFailedChildrenValues: async () => {
|
|
423
|
+
if (embedded) {
|
|
424
|
+
return await getSharedManager().getFailedChildrenValues(jobId(id));
|
|
425
|
+
}
|
|
426
|
+
if (!tcp)
|
|
427
|
+
return {};
|
|
428
|
+
const res = await tcp.send({ cmd: 'GetFailedChildrenValues', id });
|
|
429
|
+
return res.values ?? {};
|
|
430
|
+
},
|
|
431
|
+
getIgnoredChildrenFailures: async () => {
|
|
432
|
+
if (embedded) {
|
|
433
|
+
return await getSharedManager().getIgnoredChildrenFailures(jobId(id));
|
|
434
|
+
}
|
|
435
|
+
if (!tcp)
|
|
436
|
+
return {};
|
|
437
|
+
const res = await tcp.send({ cmd: 'GetIgnoredChildrenFailures', id });
|
|
438
|
+
return res.values ?? {};
|
|
439
|
+
},
|
|
440
|
+
removeChildDependency: async () => {
|
|
441
|
+
if (embedded) {
|
|
442
|
+
return await getSharedManager().removeChildDependency(jobId(id));
|
|
443
|
+
}
|
|
444
|
+
if (!tcp)
|
|
445
|
+
return false;
|
|
446
|
+
const res = await tcp.send({ cmd: 'RemoveChildDependency', id });
|
|
447
|
+
return res.removed ?? false;
|
|
448
|
+
},
|
|
449
|
+
removeDeduplicationKey: () => Promise.reject(new Error('removeDeduplicationKey is not implemented — no server primitive available')),
|
|
450
|
+
removeUnprocessedChildren: async () => {
|
|
451
|
+
if (embedded) {
|
|
452
|
+
await getSharedManager().removeUnprocessedChildren(jobId(id));
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
if (tcp)
|
|
456
|
+
await tcp.send({ cmd: 'RemoveUnprocessedChildren', id });
|
|
457
|
+
},
|
|
218
458
|
};
|
|
219
459
|
}
|
|
220
|
-
|
|
460
|
+
/** Shared dependency computation for both embedded and TCP modes */
|
|
461
|
+
async function computeDepsSimple(id, queueName, embedded, tcp) {
|
|
462
|
+
const processed = {};
|
|
463
|
+
const unprocessed = [];
|
|
464
|
+
let childIds = [];
|
|
465
|
+
if (embedded) {
|
|
466
|
+
const job = await getSharedManager().getJob(jobId(id));
|
|
467
|
+
childIds = (job?.childrenIds ?? []).map(String);
|
|
468
|
+
}
|
|
469
|
+
else if (tcp) {
|
|
470
|
+
const jobRes = await tcp.send({ cmd: 'GetJob', id });
|
|
471
|
+
const parent = jobRes.job;
|
|
472
|
+
childIds = (parent?.childrenIds ?? []).map(String);
|
|
473
|
+
}
|
|
474
|
+
for (const cid of childIds) {
|
|
475
|
+
let state = 'unknown';
|
|
476
|
+
let result;
|
|
477
|
+
if (embedded) {
|
|
478
|
+
const mgr = getSharedManager();
|
|
479
|
+
state = await mgr.getJobState(jobId(cid));
|
|
480
|
+
if (state === 'completed')
|
|
481
|
+
result = mgr.getResult(jobId(cid));
|
|
482
|
+
}
|
|
483
|
+
else if (tcp) {
|
|
484
|
+
const r = await tcp.send({ cmd: 'GetState', id: cid });
|
|
485
|
+
state = r.state ?? 'unknown';
|
|
486
|
+
if (state === 'completed') {
|
|
487
|
+
const rr = await tcp.send({ cmd: 'GetResult', id: cid });
|
|
488
|
+
result = rr.result;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
const key = `${queueName}:${cid}`;
|
|
492
|
+
if (state === 'completed' || state === 'failed') {
|
|
493
|
+
processed[key] = result ?? null;
|
|
494
|
+
}
|
|
495
|
+
else {
|
|
496
|
+
unprocessed.push(key);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
return { processed, unprocessed };
|
|
500
|
+
}
|
|
@@ -18,6 +18,7 @@ interface AddContext {
|
|
|
18
18
|
changeJobDelay: (id: string, delay: number) => Promise<void>;
|
|
19
19
|
changeJobPriority: (id: string, opts: {
|
|
20
20
|
priority: number;
|
|
21
|
+
lifo?: boolean;
|
|
21
22
|
}) => Promise<void>;
|
|
22
23
|
extendJobLock: (id: string, token: string, duration: number) => Promise<number>;
|
|
23
24
|
clearJobLogs: (id: string, keepLogs?: number) => Promise<void>;
|
|
@@ -44,4 +45,3 @@ export declare function addBulk<T>(ctx: AddContext, jobs: Array<{
|
|
|
44
45
|
opts?: JobOptions;
|
|
45
46
|
}>): Promise<Job<T>[]>;
|
|
46
47
|
export {};
|
|
47
|
-
//# sourceMappingURL=add.d.ts.map
|