@tachybase/plugin-adapter-bullmq 1.3.17 → 1.3.19
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/dist/externalVersion.js +2 -2
- package/dist/node_modules/@bull-board/api/dist/src/handlers/error.d.ts +4 -2
- package/dist/node_modules/@bull-board/api/dist/src/handlers/error.js +2 -2
- package/dist/node_modules/@bull-board/api/dist/src/handlers/pauseAll.d.ts +4 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/pauseAll.js +15 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/queues.js +4 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/resumeAll.d.ts +4 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/resumeAll.js +15 -0
- package/dist/node_modules/@bull-board/api/dist/src/index.js +1 -1
- package/dist/node_modules/@bull-board/api/dist/src/queueAdapters/base.d.ts +4 -0
- package/dist/node_modules/@bull-board/api/dist/src/queueAdapters/base.js +6 -0
- package/dist/node_modules/@bull-board/api/dist/src/queueAdapters/bull.js +6 -4
- package/dist/node_modules/@bull-board/api/dist/src/routes.js +4 -0
- package/dist/node_modules/@bull-board/api/dist/typings/app.d.ts +22 -2
- package/dist/node_modules/@bull-board/api/package.json +1 -1
- package/dist/node_modules/@bull-board/koa/dist/KoaAdapter.js +1 -1
- package/dist/node_modules/@bull-board/koa/dist/index.js +6 -6
- package/dist/node_modules/@bull-board/koa/package.json +1 -1
- package/dist/node_modules/bullmq/dist/cjs/classes/backoffs.js +18 -5
- package/dist/node_modules/bullmq/dist/cjs/classes/child-pool.js +7 -2
- package/dist/node_modules/bullmq/dist/cjs/classes/child-processor.js +59 -5
- package/dist/node_modules/bullmq/dist/cjs/classes/child.js +3 -1
- package/dist/node_modules/bullmq/dist/cjs/classes/errors/index.js +2 -1
- package/dist/node_modules/bullmq/dist/cjs/classes/errors/waiting-error.js +19 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/flow-producer.js +21 -5
- package/dist/node_modules/bullmq/dist/cjs/classes/index.js +1 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/job-scheduler.js +88 -62
- package/dist/node_modules/bullmq/dist/cjs/classes/job.js +216 -109
- package/dist/node_modules/bullmq/dist/cjs/classes/main-base.js +1 -1
- package/dist/node_modules/bullmq/dist/cjs/classes/queue-base.js +10 -9
- package/dist/node_modules/bullmq/dist/cjs/classes/queue-getters.js +34 -14
- package/dist/node_modules/bullmq/dist/cjs/classes/queue.js +19 -13
- package/dist/node_modules/bullmq/dist/cjs/classes/redis-connection.js +16 -9
- package/dist/node_modules/bullmq/dist/cjs/classes/repeat.js +1 -1
- package/dist/node_modules/bullmq/dist/cjs/classes/sandbox.js +54 -28
- package/dist/node_modules/bullmq/dist/cjs/classes/scripts.js +141 -39
- package/dist/node_modules/bullmq/dist/cjs/classes/worker.js +191 -182
- package/dist/node_modules/bullmq/dist/cjs/commands/addDelayedJob-6.lua +6 -17
- package/dist/node_modules/bullmq/dist/cjs/commands/addJobScheduler-11.lua +123 -0
- package/dist/node_modules/bullmq/dist/{esm/commands/addParentJob-4.lua → cjs/commands/addParentJob-5.lua} +7 -6
- package/dist/node_modules/bullmq/dist/cjs/commands/{addPrioritizedJob-8.lua → addPrioritizedJob-9.lua} +11 -10
- package/dist/node_modules/bullmq/dist/cjs/commands/addRepeatableJob-2.lua +2 -2
- package/dist/node_modules/bullmq/dist/{esm/commands/addStandardJob-8.lua → cjs/commands/addStandardJob-9.lua} +9 -8
- package/dist/node_modules/bullmq/dist/cjs/commands/cleanJobsInSet-3.lua +9 -5
- package/dist/node_modules/bullmq/dist/cjs/commands/drain-5.lua +16 -16
- package/dist/node_modules/bullmq/dist/cjs/commands/getDependencyCounts-4.lua +31 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/getState-8.lua +5 -5
- package/dist/node_modules/bullmq/dist/cjs/commands/getStateV2-8.lua +8 -8
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/addDelayedJob.lua +23 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/addJobFromScheduler.lua +37 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/addJobWithPriority.lua +2 -2
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/cleanList.lua +4 -2
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/cleanSet.lua +3 -11
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/collectMetrics.lua +1 -1
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/deduplicateJob.lua +63 -18
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/filterOutJobsToIgnore.lua +14 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/getNextDelayedTimestamp.lua +1 -1
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/getOrSetMaxEvents.lua +6 -6
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/getPriorityScore.lua +8 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/isJobSchedulerJob.lua +15 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/isLocked.lua +1 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/moveChildFromDependenciesIfNeeded.lua +77 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/{moveJobFromPriorityToActive.lua → moveJobFromPrioritizedToActive.lua} +1 -1
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/moveParentToWait.lua +45 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/moveParentToWaitIfNeeded.lua +9 -50
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/moveParentToWaitIfNoPendingDependencies.lua +13 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/prepareJobForProcessing.lua +2 -1
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/promoteDelayedJobs.lua +7 -3
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeDeduplicationKeyIfNeededOnFinalization.lua +23 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeDeduplicationKeyIfNeededOnRemoval.lua +16 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeJob.lua +2 -2
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeJobKeys.lua +2 -2
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeJobWithChildren.lua +95 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeListJobs.lua +7 -1
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeParentDependencyKey.lua +5 -5
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeZSetJobs.lua +2 -8
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/storeJob.lua +2 -2
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/storeJobScheduler.lua +52 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/trimEvents.lua +1 -1
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/updateExistingJobsParent.lua +1 -1
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/updateJobFields.lua +5 -5
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/updateParentDepsIfNeeded.lua +2 -2
- package/dist/node_modules/bullmq/dist/cjs/commands/isFinished-3.lua +2 -2
- package/dist/node_modules/bullmq/dist/cjs/commands/moveJobFromActiveToWait-9.lua +63 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/moveStalledJobsToWait-8.lua +109 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/moveToActive-11.lua +3 -2
- package/dist/node_modules/bullmq/dist/cjs/commands/moveToFinished-14.lua +52 -52
- package/dist/node_modules/bullmq/dist/cjs/commands/moveToWaitingChildren-8.lua +106 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/removeJob-2.lua +18 -66
- package/dist/node_modules/bullmq/dist/cjs/commands/removeJobScheduler-3.lua +1 -1
- package/dist/node_modules/bullmq/dist/cjs/commands/removeUnprocessedChildren-2.lua +31 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/retryJob-11.lua +11 -5
- package/dist/node_modules/bullmq/dist/cjs/commands/updateJobScheduler-12.lua +90 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/updateRepeatableJobMillis-1.lua +1 -1
- package/dist/node_modules/bullmq/dist/cjs/enums/child-command.js +2 -0
- package/dist/node_modules/bullmq/dist/cjs/enums/error-code.js +2 -1
- package/dist/node_modules/bullmq/dist/cjs/enums/parent-command.js +5 -2
- package/dist/node_modules/bullmq/dist/cjs/index.js +1 -1
- package/dist/node_modules/bullmq/dist/cjs/interfaces/index.js +2 -1
- package/dist/node_modules/bullmq/dist/cjs/interfaces/{debounce-options.js → parent-options.js} +1 -1
- package/dist/node_modules/bullmq/dist/cjs/interfaces/receiver.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/addDelayedJob-6.js +163 -84
- package/dist/node_modules/bullmq/dist/cjs/scripts/addJobScheduler-11.js +465 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/{addParentJob-4.js → addParentJob-5.js} +147 -75
- package/dist/node_modules/bullmq/dist/cjs/scripts/{addPrioritizedJob-8.js → addPrioritizedJob-9.js} +151 -79
- package/dist/node_modules/bullmq/dist/cjs/scripts/addRepeatableJob-2.js +18 -13
- package/dist/node_modules/bullmq/dist/cjs/scripts/{addStandardJob-8.js → addStandardJob-9.js} +149 -77
- package/dist/node_modules/bullmq/dist/cjs/scripts/changeDelay-4.js +7 -7
- package/dist/node_modules/bullmq/dist/cjs/scripts/changePriority-7.js +8 -2
- package/dist/node_modules/bullmq/dist/cjs/scripts/cleanJobsInSet-3.js +45 -29
- package/dist/node_modules/bullmq/dist/cjs/scripts/drain-5.js +49 -35
- package/dist/node_modules/bullmq/dist/cjs/scripts/getDependencyCounts-4.js +37 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/getState-8.js +5 -5
- package/dist/node_modules/bullmq/dist/cjs/scripts/getStateV2-8.js +8 -8
- package/dist/node_modules/bullmq/dist/cjs/scripts/index.js +10 -7
- package/dist/node_modules/bullmq/dist/cjs/scripts/isFinished-3.js +2 -2
- package/dist/node_modules/bullmq/dist/cjs/scripts/{moveJobFromActiveToWait-10.js → moveJobFromActiveToWait-9.js} +57 -37
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveJobsToWait-8.js +6 -6
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveStalledJobsToWait-8.js +171 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveToActive-11.js +18 -8
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveToDelayed-8.js +12 -12
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveToFinished-14.js +218 -155
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveToWaitingChildren-8.js +529 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/obliterate-2.js +33 -20
- package/dist/node_modules/bullmq/dist/cjs/scripts/pause-7.js +1 -1
- package/dist/node_modules/bullmq/dist/cjs/scripts/promote-9.js +8 -2
- package/dist/node_modules/bullmq/dist/cjs/scripts/removeChildDependency-1.js +7 -7
- package/dist/node_modules/bullmq/dist/cjs/scripts/removeJob-2.js +120 -63
- package/dist/node_modules/bullmq/dist/cjs/scripts/removeJobScheduler-3.js +3 -3
- package/dist/node_modules/bullmq/dist/cjs/scripts/removeRepeatable-3.js +2 -2
- package/dist/node_modules/bullmq/dist/cjs/scripts/removeUnprocessedChildren-2.js +339 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/reprocessJob-8.js +6 -6
- package/dist/node_modules/bullmq/dist/cjs/scripts/retryJob-11.js +47 -26
- package/dist/node_modules/bullmq/dist/cjs/scripts/updateJobScheduler-12.js +274 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/updateProgress-3.js +6 -6
- package/dist/node_modules/bullmq/dist/cjs/scripts/updateRepeatableJobMillis-1.js +1 -1
- package/dist/node_modules/bullmq/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/node_modules/bullmq/dist/cjs/types/deduplication-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/types/index.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/types/job-progress.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/types/script-queue-context.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/utils.js +29 -1
- package/dist/node_modules/bullmq/dist/cjs/version.js +1 -1
- package/dist/node_modules/bullmq/dist/esm/classes/backoffs.d.ts +1 -1
- package/dist/node_modules/bullmq/dist/esm/classes/backoffs.js +18 -5
- package/dist/node_modules/bullmq/dist/esm/classes/child-pool.d.ts +1 -1
- package/dist/node_modules/bullmq/dist/esm/classes/child-pool.js +7 -2
- package/dist/node_modules/bullmq/dist/esm/classes/child-processor.d.ts +3 -2
- package/dist/node_modules/bullmq/dist/esm/classes/child-processor.js +59 -5
- package/dist/node_modules/bullmq/dist/esm/classes/child.js +3 -1
- package/dist/node_modules/bullmq/dist/esm/classes/errors/index.d.ts +2 -1
- package/dist/node_modules/bullmq/dist/esm/classes/errors/index.js +2 -1
- package/dist/node_modules/bullmq/dist/esm/classes/errors/waiting-error.d.ts +10 -0
- package/dist/node_modules/bullmq/dist/esm/classes/errors/waiting-error.js +15 -0
- package/dist/node_modules/bullmq/dist/esm/classes/flow-producer.d.ts +3 -9
- package/dist/node_modules/bullmq/dist/esm/classes/flow-producer.js +21 -5
- package/dist/node_modules/bullmq/dist/esm/classes/index.d.ts +1 -0
- package/dist/node_modules/bullmq/dist/esm/classes/index.js +1 -0
- package/dist/node_modules/bullmq/dist/esm/classes/job-scheduler.d.ts +2 -2
- package/dist/node_modules/bullmq/dist/esm/classes/job-scheduler.js +88 -62
- package/dist/node_modules/bullmq/dist/esm/classes/job.d.ts +69 -19
- package/dist/node_modules/bullmq/dist/esm/classes/job.js +217 -110
- package/dist/node_modules/bullmq/dist/esm/classes/main-base.d.ts +2 -3
- package/dist/node_modules/bullmq/dist/esm/classes/main-base.js +1 -1
- package/dist/node_modules/bullmq/dist/esm/classes/queue-base.d.ts +2 -5
- package/dist/node_modules/bullmq/dist/esm/classes/queue-base.js +11 -10
- package/dist/node_modules/bullmq/dist/esm/classes/queue-events-producer.d.ts +2 -2
- package/dist/node_modules/bullmq/dist/esm/classes/queue-events.d.ts +118 -29
- package/dist/node_modules/bullmq/dist/esm/classes/queue-getters.d.ts +20 -13
- package/dist/node_modules/bullmq/dist/esm/classes/queue-getters.js +34 -14
- package/dist/node_modules/bullmq/dist/esm/classes/queue.d.ts +19 -16
- package/dist/node_modules/bullmq/dist/esm/classes/queue.js +19 -13
- package/dist/node_modules/bullmq/dist/esm/classes/redis-connection.d.ts +7 -3
- package/dist/node_modules/bullmq/dist/esm/classes/redis-connection.js +16 -9
- package/dist/node_modules/bullmq/dist/esm/classes/repeat.js +1 -1
- package/dist/node_modules/bullmq/dist/esm/classes/sandbox.js +54 -28
- package/dist/node_modules/bullmq/dist/esm/classes/scripts.d.ts +20 -13
- package/dist/node_modules/bullmq/dist/esm/classes/scripts.js +141 -39
- package/dist/node_modules/bullmq/dist/esm/classes/worker.d.ts +28 -7
- package/dist/node_modules/bullmq/dist/esm/classes/worker.js +192 -183
- package/dist/node_modules/bullmq/dist/esm/commands/addDelayedJob-6.lua +6 -17
- package/dist/node_modules/bullmq/dist/esm/commands/addJobScheduler-11.lua +123 -0
- package/dist/node_modules/bullmq/dist/{cjs/commands/addParentJob-4.lua → esm/commands/addParentJob-5.lua} +7 -6
- package/dist/node_modules/bullmq/dist/esm/commands/{addPrioritizedJob-8.lua → addPrioritizedJob-9.lua} +11 -10
- package/dist/node_modules/bullmq/dist/esm/commands/addRepeatableJob-2.lua +2 -2
- package/dist/node_modules/bullmq/dist/{cjs/commands/addStandardJob-8.lua → esm/commands/addStandardJob-9.lua} +9 -8
- package/dist/node_modules/bullmq/dist/esm/commands/cleanJobsInSet-3.lua +9 -5
- package/dist/node_modules/bullmq/dist/esm/commands/drain-5.lua +16 -16
- package/dist/node_modules/bullmq/dist/esm/commands/getDependencyCounts-4.lua +31 -0
- package/dist/node_modules/bullmq/dist/esm/commands/getState-8.lua +5 -5
- package/dist/node_modules/bullmq/dist/esm/commands/getStateV2-8.lua +8 -8
- package/dist/node_modules/bullmq/dist/esm/commands/includes/addDelayedJob.lua +23 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/addJobFromScheduler.lua +37 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/addJobWithPriority.lua +2 -2
- package/dist/node_modules/bullmq/dist/esm/commands/includes/cleanList.lua +4 -2
- package/dist/node_modules/bullmq/dist/esm/commands/includes/cleanSet.lua +3 -11
- package/dist/node_modules/bullmq/dist/esm/commands/includes/collectMetrics.lua +1 -1
- package/dist/node_modules/bullmq/dist/esm/commands/includes/deduplicateJob.lua +63 -18
- package/dist/node_modules/bullmq/dist/esm/commands/includes/filterOutJobsToIgnore.lua +14 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/getNextDelayedTimestamp.lua +1 -1
- package/dist/node_modules/bullmq/dist/esm/commands/includes/getOrSetMaxEvents.lua +6 -6
- package/dist/node_modules/bullmq/dist/esm/commands/includes/getPriorityScore.lua +8 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/isJobSchedulerJob.lua +15 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/isLocked.lua +1 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/moveChildFromDependenciesIfNeeded.lua +77 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/{moveJobFromPriorityToActive.lua → moveJobFromPrioritizedToActive.lua} +1 -1
- package/dist/node_modules/bullmq/dist/esm/commands/includes/moveParentToWait.lua +45 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/moveParentToWaitIfNeeded.lua +9 -50
- package/dist/node_modules/bullmq/dist/esm/commands/includes/moveParentToWaitIfNoPendingDependencies.lua +13 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/prepareJobForProcessing.lua +2 -1
- package/dist/node_modules/bullmq/dist/esm/commands/includes/promoteDelayedJobs.lua +7 -3
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeDeduplicationKeyIfNeededOnFinalization.lua +23 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeDeduplicationKeyIfNeededOnRemoval.lua +16 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeJob.lua +2 -2
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeJobKeys.lua +2 -2
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeJobWithChildren.lua +95 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeListJobs.lua +7 -1
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeParentDependencyKey.lua +5 -5
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeZSetJobs.lua +2 -8
- package/dist/node_modules/bullmq/dist/esm/commands/includes/storeJob.lua +2 -2
- package/dist/node_modules/bullmq/dist/esm/commands/includes/storeJobScheduler.lua +52 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/trimEvents.lua +1 -1
- package/dist/node_modules/bullmq/dist/esm/commands/includes/updateExistingJobsParent.lua +1 -1
- package/dist/node_modules/bullmq/dist/esm/commands/includes/updateJobFields.lua +5 -5
- package/dist/node_modules/bullmq/dist/esm/commands/includes/updateParentDepsIfNeeded.lua +2 -2
- package/dist/node_modules/bullmq/dist/esm/commands/isFinished-3.lua +2 -2
- package/dist/node_modules/bullmq/dist/esm/commands/moveJobFromActiveToWait-9.lua +63 -0
- package/dist/node_modules/bullmq/dist/esm/commands/moveStalledJobsToWait-8.lua +109 -0
- package/dist/node_modules/bullmq/dist/esm/commands/moveToActive-11.lua +3 -2
- package/dist/node_modules/bullmq/dist/esm/commands/moveToFinished-14.lua +52 -52
- package/dist/node_modules/bullmq/dist/esm/commands/moveToWaitingChildren-8.lua +106 -0
- package/dist/node_modules/bullmq/dist/esm/commands/removeJob-2.lua +18 -66
- package/dist/node_modules/bullmq/dist/esm/commands/removeJobScheduler-3.lua +1 -1
- package/dist/node_modules/bullmq/dist/esm/commands/removeUnprocessedChildren-2.lua +31 -0
- package/dist/node_modules/bullmq/dist/esm/commands/retryJob-11.lua +11 -5
- package/dist/node_modules/bullmq/dist/esm/commands/updateJobScheduler-12.lua +90 -0
- package/dist/node_modules/bullmq/dist/esm/commands/updateRepeatableJobMillis-1.lua +1 -1
- package/dist/node_modules/bullmq/dist/esm/enums/child-command.d.ts +3 -1
- package/dist/node_modules/bullmq/dist/esm/enums/child-command.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/enums/error-code.d.ts +3 -2
- package/dist/node_modules/bullmq/dist/esm/enums/error-code.js +2 -1
- package/dist/node_modules/bullmq/dist/esm/enums/parent-command.d.ts +5 -2
- package/dist/node_modules/bullmq/dist/esm/enums/parent-command.js +5 -2
- package/dist/node_modules/bullmq/dist/esm/interfaces/backoff-options.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/base-job-options.d.ts +3 -9
- package/dist/node_modules/bullmq/dist/esm/interfaces/child-message.d.ts +1 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/index.d.ts +2 -1
- package/dist/node_modules/bullmq/dist/esm/interfaces/index.js +2 -1
- package/dist/node_modules/bullmq/dist/esm/interfaces/job-json.d.ts +6 -2
- package/dist/node_modules/bullmq/dist/esm/interfaces/job-scheduler-json.d.ts +7 -4
- package/dist/node_modules/bullmq/dist/esm/interfaces/minimal-job.d.ts +34 -15
- package/dist/node_modules/bullmq/dist/esm/interfaces/parent-options.d.ts +11 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/parent-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/parent.d.ts +6 -2
- package/dist/node_modules/bullmq/dist/esm/interfaces/queue-options.d.ts +15 -6
- package/dist/node_modules/bullmq/dist/esm/interfaces/receiver.d.ts +4 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/receiver.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/repeat-options.d.ts +1 -2
- package/dist/node_modules/bullmq/dist/esm/interfaces/repeatable-options.d.ts +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/sandboxed-job.d.ts +3 -2
- package/dist/node_modules/bullmq/dist/esm/interfaces/sandboxed-options.d.ts +1 -1
- package/dist/node_modules/bullmq/dist/esm/interfaces/telemetry.d.ts +18 -15
- package/dist/node_modules/bullmq/dist/esm/interfaces/worker-options.d.ts +10 -10
- package/dist/node_modules/bullmq/dist/esm/scripts/addDelayedJob-6.js +163 -84
- package/dist/node_modules/bullmq/dist/esm/scripts/addJobScheduler-11.js +462 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/{addParentJob-4.js → addParentJob-5.js} +147 -75
- package/dist/node_modules/bullmq/dist/esm/scripts/{addPrioritizedJob-8.js → addPrioritizedJob-9.js} +151 -79
- package/dist/node_modules/bullmq/dist/esm/scripts/addRepeatableJob-2.js +18 -13
- package/dist/node_modules/bullmq/dist/esm/scripts/{addStandardJob-8.js → addStandardJob-9.js} +149 -77
- package/dist/node_modules/bullmq/dist/esm/scripts/changeDelay-4.js +7 -7
- package/dist/node_modules/bullmq/dist/esm/scripts/changePriority-7.js +8 -2
- package/dist/node_modules/bullmq/dist/esm/scripts/cleanJobsInSet-3.js +45 -29
- package/dist/node_modules/bullmq/dist/esm/scripts/drain-5.js +49 -35
- package/dist/node_modules/bullmq/dist/esm/scripts/getDependencyCounts-4.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getDependencyCounts-4.js +34 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getState-8.js +5 -5
- package/dist/node_modules/bullmq/dist/esm/scripts/getStateV2-8.js +8 -8
- package/dist/node_modules/bullmq/dist/esm/scripts/index.d.ts +10 -7
- package/dist/node_modules/bullmq/dist/esm/scripts/index.js +10 -7
- package/dist/node_modules/bullmq/dist/esm/scripts/isFinished-3.js +2 -2
- package/dist/node_modules/bullmq/dist/esm/scripts/{moveJobFromActiveToWait-10.js → moveJobFromActiveToWait-9.js} +57 -37
- package/dist/node_modules/bullmq/dist/esm/scripts/moveJobsToWait-8.js +6 -6
- package/dist/node_modules/bullmq/dist/esm/scripts/moveStalledJobsToWait-8.js +168 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveToActive-11.js +18 -8
- package/dist/node_modules/bullmq/dist/esm/scripts/moveToDelayed-8.js +12 -12
- package/dist/node_modules/bullmq/dist/esm/scripts/moveToFinished-14.js +218 -155
- package/dist/node_modules/bullmq/dist/esm/scripts/moveToWaitingChildren-8.js +526 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/obliterate-2.js +33 -20
- package/dist/node_modules/bullmq/dist/esm/scripts/pause-7.js +1 -1
- package/dist/node_modules/bullmq/dist/esm/scripts/promote-9.js +8 -2
- package/dist/node_modules/bullmq/dist/esm/scripts/removeChildDependency-1.js +7 -7
- package/dist/node_modules/bullmq/dist/esm/scripts/removeJob-2.js +120 -63
- package/dist/node_modules/bullmq/dist/esm/scripts/removeJobScheduler-3.js +3 -3
- package/dist/node_modules/bullmq/dist/esm/scripts/removeRepeatable-3.js +2 -2
- package/dist/node_modules/bullmq/dist/esm/scripts/removeUnprocessedChildren-2.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/removeUnprocessedChildren-2.js +336 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/reprocessJob-8.js +6 -6
- package/dist/node_modules/bullmq/dist/esm/scripts/retryJob-11.js +47 -26
- package/dist/node_modules/bullmq/dist/esm/scripts/updateJobScheduler-12.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/updateJobScheduler-12.js +271 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/updateProgress-3.js +6 -6
- package/dist/node_modules/bullmq/dist/esm/scripts/updateRepeatableJobMillis-1.js +1 -1
- package/dist/node_modules/bullmq/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/node_modules/bullmq/dist/esm/types/deduplication-options.d.ts +22 -0
- package/dist/node_modules/bullmq/dist/esm/types/deduplication-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/index.d.ts +3 -0
- package/dist/node_modules/bullmq/dist/esm/types/index.js +3 -0
- package/dist/node_modules/bullmq/dist/esm/types/job-options.d.ts +19 -8
- package/dist/node_modules/bullmq/dist/esm/types/job-progress.d.ts +1 -0
- package/dist/node_modules/bullmq/dist/esm/types/job-progress.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/script-queue-context.d.ts +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/script-queue-context.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/utils.d.ts +25 -5
- package/dist/node_modules/bullmq/dist/esm/utils.js +27 -0
- package/dist/node_modules/bullmq/dist/esm/version.d.ts +1 -1
- package/dist/node_modules/bullmq/dist/esm/version.js +1 -1
- package/dist/node_modules/bullmq/package.json +1 -1
- package/package.json +7 -7
- package/dist/node_modules/bullmq/dist/cjs/commands/addJobScheduler-2.lua +0 -91
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/moveParentFromWaitingChildrenToFailed.lua +0 -53
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeDeduplicationKey.lua +0 -11
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeDeduplicationKeyIfNeeded.lua +0 -14
- package/dist/node_modules/bullmq/dist/cjs/commands/moveJobFromActiveToWait-10.lua +0 -60
- package/dist/node_modules/bullmq/dist/cjs/commands/moveStalledJobsToWait-9.lua +0 -156
- package/dist/node_modules/bullmq/dist/cjs/commands/moveToWaitingChildren-5.lua +0 -68
- package/dist/node_modules/bullmq/dist/cjs/scripts/addJobScheduler-2.js +0 -237
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveStalledJobsToWait-9.js +0 -529
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveToWaitingChildren-5.js +0 -83
- package/dist/node_modules/bullmq/dist/esm/commands/addJobScheduler-2.lua +0 -91
- package/dist/node_modules/bullmq/dist/esm/commands/includes/moveParentFromWaitingChildrenToFailed.lua +0 -53
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeDeduplicationKey.lua +0 -11
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeDeduplicationKeyIfNeeded.lua +0 -14
- package/dist/node_modules/bullmq/dist/esm/commands/moveJobFromActiveToWait-10.lua +0 -60
- package/dist/node_modules/bullmq/dist/esm/commands/moveStalledJobsToWait-9.lua +0 -156
- package/dist/node_modules/bullmq/dist/esm/commands/moveToWaitingChildren-5.lua +0 -68
- package/dist/node_modules/bullmq/dist/esm/interfaces/debounce-options.d.ts +0 -13
- package/dist/node_modules/bullmq/dist/esm/interfaces/debounce-options.js +0 -2
- package/dist/node_modules/bullmq/dist/esm/scripts/addJobScheduler-2.js +0 -234
- package/dist/node_modules/bullmq/dist/esm/scripts/moveStalledJobsToWait-9.js +0 -526
- package/dist/node_modules/bullmq/dist/esm/scripts/moveToWaitingChildren-5.js +0 -80
- /package/dist/node_modules/bullmq/dist/esm/scripts/{addJobScheduler-2.d.ts → addJobScheduler-11.d.ts} +0 -0
- /package/dist/node_modules/bullmq/dist/esm/scripts/{addParentJob-4.d.ts → addParentJob-5.d.ts} +0 -0
- /package/dist/node_modules/bullmq/dist/esm/scripts/{addPrioritizedJob-8.d.ts → addPrioritizedJob-9.d.ts} +0 -0
- /package/dist/node_modules/bullmq/dist/esm/scripts/{addStandardJob-8.d.ts → addStandardJob-9.d.ts} +0 -0
- /package/dist/node_modules/bullmq/dist/esm/scripts/{moveJobFromActiveToWait-10.d.ts → moveJobFromActiveToWait-9.d.ts} +0 -0
- /package/dist/node_modules/bullmq/dist/esm/scripts/{moveStalledJobsToWait-9.d.ts → moveStalledJobsToWait-8.d.ts} +0 -0
- /package/dist/node_modules/bullmq/dist/esm/scripts/{moveToWaitingChildren-5.d.ts → moveToWaitingChildren-8.d.ts} +0 -0
|
@@ -37,15 +37,18 @@ const content = `--[[
|
|
|
37
37
|
opts - attempts max attempts
|
|
38
38
|
opts - maxMetricsSize
|
|
39
39
|
opts - fpof - fail parent on fail
|
|
40
|
+
opts - cpof - continue parent on fail
|
|
40
41
|
opts - idof - ignore dependency on fail
|
|
41
42
|
opts - rdof - remove dependency on fail
|
|
43
|
+
opts - name - worker name
|
|
42
44
|
Output:
|
|
43
45
|
0 OK
|
|
44
46
|
-1 Missing key.
|
|
45
47
|
-2 Missing lock.
|
|
46
48
|
-3 Job not in active set
|
|
47
|
-
-4 Job has pending
|
|
49
|
+
-4 Job has pending children
|
|
48
50
|
-6 Lock is not owned by this client
|
|
51
|
+
-9 Job has failed children
|
|
49
52
|
Events:
|
|
50
53
|
'completed/failed'
|
|
51
54
|
]]
|
|
@@ -54,7 +57,7 @@ local rcall = redis.call
|
|
|
54
57
|
--[[
|
|
55
58
|
Functions to collect metrics based on a current and previous count of jobs.
|
|
56
59
|
Granualarity is fixed at 1 minute.
|
|
57
|
-
]]
|
|
60
|
+
]]
|
|
58
61
|
--[[
|
|
59
62
|
Function to loop in batches.
|
|
60
63
|
Just a bit of warning, some commands as ZREM
|
|
@@ -112,7 +115,7 @@ local function getNextDelayedTimestamp(delayedKey)
|
|
|
112
115
|
local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES")
|
|
113
116
|
if #result then
|
|
114
117
|
local nextTimestamp = tonumber(result[2])
|
|
115
|
-
if nextTimestamp ~= nil then
|
|
118
|
+
if nextTimestamp ~= nil then
|
|
116
119
|
return nextTimestamp / 0x1000
|
|
117
120
|
end
|
|
118
121
|
end
|
|
@@ -155,7 +158,7 @@ end
|
|
|
155
158
|
--[[
|
|
156
159
|
Function to move job from prioritized state to active.
|
|
157
160
|
]]
|
|
158
|
-
local function
|
|
161
|
+
local function moveJobFromPrioritizedToActive(priorityKey, activeKey, priorityCounterKey)
|
|
159
162
|
local prioritizedJob = rcall("ZPOPMIN", priorityKey)
|
|
160
163
|
if #prioritizedJob > 0 then
|
|
161
164
|
rcall("LPUSH", activeKey, prioritizedJob[1])
|
|
@@ -169,7 +172,16 @@ end
|
|
|
169
172
|
]]
|
|
170
173
|
-- Includes
|
|
171
174
|
--[[
|
|
172
|
-
Validate and move parent to
|
|
175
|
+
Validate and move parent to a wait status (waiting, delayed or prioritized)
|
|
176
|
+
if no pending dependencies.
|
|
177
|
+
]]
|
|
178
|
+
-- Includes
|
|
179
|
+
--[[
|
|
180
|
+
Validate and move parent to a wait status (waiting, delayed or prioritized) if needed.
|
|
181
|
+
]]
|
|
182
|
+
-- Includes
|
|
183
|
+
--[[
|
|
184
|
+
Move parent to a wait status (wait, prioritized or delayed)
|
|
173
185
|
]]
|
|
174
186
|
-- Includes
|
|
175
187
|
--[[
|
|
@@ -204,10 +216,16 @@ end
|
|
|
204
216
|
Function to add job considering priority.
|
|
205
217
|
]]
|
|
206
218
|
-- Includes
|
|
219
|
+
--[[
|
|
220
|
+
Function to get priority score.
|
|
221
|
+
]]
|
|
222
|
+
local function getPriorityScore(priority, priorityCounterKey)
|
|
223
|
+
local prioCounter = rcall("INCR", priorityCounterKey)
|
|
224
|
+
return priority * 0x100000000 + prioCounter % 0x100000000
|
|
225
|
+
end
|
|
207
226
|
local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey,
|
|
208
227
|
isPausedOrMaxed)
|
|
209
|
-
local
|
|
210
|
-
local score = priority * 0x100000000 + prioCounter % 0x100000000
|
|
228
|
+
local score = getPriorityScore(priority, priorityCounterKey)
|
|
211
229
|
rcall("ZADD", prioritizedKey, score, jobId)
|
|
212
230
|
addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed)
|
|
213
231
|
end
|
|
@@ -227,58 +245,53 @@ local function isQueuePausedOrMaxed(queueMetaKey, activeKey)
|
|
|
227
245
|
end
|
|
228
246
|
return false
|
|
229
247
|
end
|
|
230
|
-
local function
|
|
231
|
-
|
|
232
|
-
local
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
local
|
|
241
|
-
local
|
|
242
|
-
local
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
248
|
+
local function moveParentToWait(parentQueueKey, parentKey, parentId, timestamp)
|
|
249
|
+
local parentWaitKey = parentQueueKey .. ":wait"
|
|
250
|
+
local parentPausedKey = parentQueueKey .. ":paused"
|
|
251
|
+
local parentActiveKey = parentQueueKey .. ":active"
|
|
252
|
+
local parentMetaKey = parentQueueKey .. ":meta"
|
|
253
|
+
local parentMarkerKey = parentQueueKey .. ":marker"
|
|
254
|
+
local jobAttributes = rcall("HMGET", parentKey, "priority", "delay")
|
|
255
|
+
local priority = tonumber(jobAttributes[1]) or 0
|
|
256
|
+
local delay = tonumber(jobAttributes[2]) or 0
|
|
257
|
+
if delay > 0 then
|
|
258
|
+
local delayedTimestamp = tonumber(timestamp) + delay
|
|
259
|
+
local score = delayedTimestamp * 0x1000
|
|
260
|
+
local parentDelayedKey = parentQueueKey .. ":delayed"
|
|
261
|
+
rcall("ZADD", parentDelayedKey, score, parentId)
|
|
262
|
+
rcall("XADD", parentQueueKey .. ":events", "*", "event", "delayed", "jobId", parentId, "delay",
|
|
263
|
+
delayedTimestamp)
|
|
264
|
+
addDelayMarkerIfNeeded(parentMarkerKey, parentDelayedKey)
|
|
265
|
+
else
|
|
266
|
+
if priority == 0 then
|
|
267
|
+
local parentTarget, isParentPausedOrMaxed = getTargetQueueList(parentMetaKey, parentActiveKey,
|
|
268
|
+
parentWaitKey, parentPausedKey)
|
|
269
|
+
addJobInTargetList(parentTarget, parentMarkerKey, "RPUSH", isParentPausedOrMaxed, parentId)
|
|
252
270
|
else
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
parentPausedKey)
|
|
257
|
-
addJobInTargetList(parentTarget, parentMarkerKey, "RPUSH", isParentPausedOrMaxed,
|
|
258
|
-
parentId)
|
|
259
|
-
else
|
|
260
|
-
local isPausedOrMaxed = isQueuePausedOrMaxed(parentMetaKey, parentActiveKey)
|
|
261
|
-
addJobWithPriority(parentMarkerKey,
|
|
262
|
-
parentQueueKey .. ":prioritized", priority,
|
|
263
|
-
parentId, parentQueueKey .. ":pc", isPausedOrMaxed)
|
|
264
|
-
end
|
|
265
|
-
rcall("XADD", parentQueueKey .. ":events", "*", "event", "waiting",
|
|
266
|
-
"jobId", parentId, "prev", "waiting-children")
|
|
271
|
+
local isPausedOrMaxed = isQueuePausedOrMaxed(parentMetaKey, parentActiveKey)
|
|
272
|
+
addJobWithPriority(parentMarkerKey, parentQueueKey .. ":prioritized", priority, parentId,
|
|
273
|
+
parentQueueKey .. ":pc", isPausedOrMaxed)
|
|
267
274
|
end
|
|
275
|
+
rcall("XADD", parentQueueKey .. ":events", "*", "event", "waiting", "jobId", parentId, "prev",
|
|
276
|
+
"waiting-children")
|
|
268
277
|
end
|
|
269
278
|
end
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
local pttl = rcall("PTTL", deduplicationKey)
|
|
277
|
-
if pttl == 0 or pttl == -1 then
|
|
278
|
-
rcall("DEL", deduplicationKey)
|
|
279
|
+
local function moveParentToWaitIfNeeded(parentQueueKey, parentKey, parentId, timestamp)
|
|
280
|
+
if rcall("EXISTS", parentKey) == 1 then
|
|
281
|
+
local parentWaitingChildrenKey = parentQueueKey .. ":waiting-children"
|
|
282
|
+
if rcall("ZSCORE", parentWaitingChildrenKey, parentId) then
|
|
283
|
+
rcall("ZREM", parentWaitingChildrenKey, parentId)
|
|
284
|
+
moveParentToWait(parentQueueKey, parentKey, parentId, timestamp)
|
|
279
285
|
end
|
|
280
286
|
end
|
|
281
287
|
end
|
|
288
|
+
local function moveParentToWaitIfNoPendingDependencies(parentQueueKey, parentDependenciesKey, parentKey,
|
|
289
|
+
parentId, timestamp)
|
|
290
|
+
local doNotHavePendingDependencies = rcall("SCARD", parentDependenciesKey) == 0
|
|
291
|
+
if doNotHavePendingDependencies then
|
|
292
|
+
moveParentToWaitIfNeeded(parentQueueKey, parentKey, parentId, timestamp)
|
|
293
|
+
end
|
|
294
|
+
end
|
|
282
295
|
--[[
|
|
283
296
|
Functions to remove jobs when removeOnFail option is provided.
|
|
284
297
|
]]
|
|
@@ -288,21 +301,26 @@ end
|
|
|
288
301
|
]]
|
|
289
302
|
-- Includes
|
|
290
303
|
--[[
|
|
291
|
-
Function to remove deduplication key
|
|
304
|
+
Function to remove deduplication key if needed
|
|
305
|
+
when a job is being removed.
|
|
292
306
|
]]
|
|
293
|
-
local function
|
|
307
|
+
local function removeDeduplicationKeyIfNeededOnRemoval(prefixKey,
|
|
308
|
+
jobKey, jobId)
|
|
294
309
|
local deduplicationId = rcall("HGET", jobKey, "deid")
|
|
295
310
|
if deduplicationId then
|
|
296
311
|
local deduplicationKey = prefixKey .. "de:" .. deduplicationId
|
|
297
|
-
rcall(
|
|
312
|
+
local currentJobId = rcall('GET', deduplicationKey)
|
|
313
|
+
if currentJobId and currentJobId == jobId then
|
|
314
|
+
return rcall("DEL", deduplicationKey)
|
|
315
|
+
end
|
|
298
316
|
end
|
|
299
317
|
end
|
|
300
318
|
--[[
|
|
301
319
|
Function to remove job keys.
|
|
302
320
|
]]
|
|
303
321
|
local function removeJobKeys(jobKey)
|
|
304
|
-
return rcall("DEL", jobKey, jobKey .. ':logs',
|
|
305
|
-
jobKey .. ':
|
|
322
|
+
return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies',
|
|
323
|
+
jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful')
|
|
306
324
|
end
|
|
307
325
|
--[[
|
|
308
326
|
Check if this job has a parent. If so we will just remove it from
|
|
@@ -320,7 +338,7 @@ end
|
|
|
320
338
|
local getJobKeyPrefix = function (jobKey, jobId)
|
|
321
339
|
return string.sub(jobKey, 0, #jobKey - #jobId)
|
|
322
340
|
end
|
|
323
|
-
local function
|
|
341
|
+
local function _moveParentToWait(parentPrefix, parentId, emitEvent)
|
|
324
342
|
local parentTarget, isPausedOrMaxed = getTargetQueueList(parentPrefix .. "meta", parentPrefix .. "active",
|
|
325
343
|
parentPrefix .. "wait", parentPrefix .. "paused")
|
|
326
344
|
addJobInTargetList(parentTarget, parentPrefix .. "marker", "RPUSH", isPausedOrMaxed, parentId)
|
|
@@ -348,10 +366,10 @@ local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debou
|
|
|
348
366
|
rcall("DEL", parentPrefix .. "de:" .. debounceId)
|
|
349
367
|
end
|
|
350
368
|
else
|
|
351
|
-
|
|
369
|
+
_moveParentToWait(parentPrefix, parentId)
|
|
352
370
|
end
|
|
353
371
|
else
|
|
354
|
-
|
|
372
|
+
_moveParentToWait(parentPrefix, parentId, true)
|
|
355
373
|
end
|
|
356
374
|
end
|
|
357
375
|
end
|
|
@@ -379,10 +397,10 @@ local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debou
|
|
|
379
397
|
rcall("DEL", parentPrefix .. "de:" .. parentAttributes[2])
|
|
380
398
|
end
|
|
381
399
|
else
|
|
382
|
-
|
|
400
|
+
_moveParentToWait(parentPrefix, parentId)
|
|
383
401
|
end
|
|
384
402
|
else
|
|
385
|
-
|
|
403
|
+
_moveParentToWait(parentPrefix, parentId, true)
|
|
386
404
|
end
|
|
387
405
|
end
|
|
388
406
|
end
|
|
@@ -396,7 +414,7 @@ local function removeJob(jobId, hard, baseKey, shouldRemoveDeduplicationKey)
|
|
|
396
414
|
local jobKey = baseKey .. jobId
|
|
397
415
|
removeParentDependencyKey(jobKey, hard, nil, baseKey)
|
|
398
416
|
if shouldRemoveDeduplicationKey then
|
|
399
|
-
|
|
417
|
+
removeDeduplicationKeyIfNeededOnRemoval(baseKey, jobKey, jobId)
|
|
400
418
|
end
|
|
401
419
|
removeJobKeys(jobKey)
|
|
402
420
|
end
|
|
@@ -449,43 +467,69 @@ local function removeJobsOnFail(queueKeyPrefix, failedKey, jobId, opts, timestam
|
|
|
449
467
|
end
|
|
450
468
|
end
|
|
451
469
|
end
|
|
452
|
-
local function
|
|
453
|
-
if rcall("
|
|
454
|
-
local
|
|
455
|
-
local
|
|
456
|
-
|
|
457
|
-
local
|
|
458
|
-
|
|
459
|
-
rcall("
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
470
|
+
local moveParentToFailedIfNeeded = function (parentQueueKey, parentKey, parentId, jobIdKey, timestamp)
|
|
471
|
+
if rcall("EXISTS", parentKey) == 1 then
|
|
472
|
+
local parentWaitingChildrenKey = parentQueueKey .. ":waiting-children"
|
|
473
|
+
local parentDelayedKey = parentQueueKey .. ":delayed"
|
|
474
|
+
local parentPrioritizedKey = parentQueueKey .. ":prioritized"
|
|
475
|
+
local parentWaitingChildrenOrDelayedKey
|
|
476
|
+
local prevState
|
|
477
|
+
if rcall("ZSCORE", parentWaitingChildrenKey, parentId) then
|
|
478
|
+
parentWaitingChildrenOrDelayedKey = parentWaitingChildrenKey
|
|
479
|
+
prevState = "waiting-children"
|
|
480
|
+
elseif rcall("ZSCORE", parentDelayedKey, parentId) then
|
|
481
|
+
parentWaitingChildrenOrDelayedKey = parentDelayedKey
|
|
482
|
+
prevState = "delayed"
|
|
483
|
+
rcall("HSET", parentKey, "delay", 0)
|
|
484
|
+
end
|
|
485
|
+
if parentWaitingChildrenOrDelayedKey then
|
|
486
|
+
rcall("ZREM", parentWaitingChildrenOrDelayedKey, parentId)
|
|
487
|
+
local parentQueuePrefix = parentQueueKey .. ":"
|
|
488
|
+
local parentFailedKey = parentQueueKey .. ":failed"
|
|
489
|
+
local deferredFailure = "child " .. jobIdKey .. " failed"
|
|
490
|
+
rcall("HSET", parentKey, "defa", deferredFailure)
|
|
491
|
+
moveParentToWait(parentQueueKey, parentKey, parentId, timestamp)
|
|
492
|
+
else
|
|
493
|
+
if not rcall("ZSCORE", parentQueueKey .. ":failed", parentId) then
|
|
494
|
+
local deferredFailure = "child " .. jobIdKey .. " failed"
|
|
495
|
+
rcall("HSET", parentKey, "defa", deferredFailure)
|
|
496
|
+
end
|
|
497
|
+
end
|
|
498
|
+
end
|
|
499
|
+
end
|
|
500
|
+
local moveChildFromDependenciesIfNeeded = function (rawParentData, childKey, failedReason, timestamp)
|
|
501
|
+
if rawParentData then
|
|
502
|
+
local parentData = cjson.decode(rawParentData)
|
|
503
|
+
local parentKey = parentData['queueKey'] .. ':' .. parentData['id']
|
|
504
|
+
local parentDependenciesChildrenKey = parentKey .. ":dependencies"
|
|
505
|
+
if parentData['fpof'] then
|
|
506
|
+
if rcall("SREM", parentDependenciesChildrenKey, childKey) == 1 then
|
|
507
|
+
local parentUnsuccesssfulChildrenKey = parentKey .. ":unsuccessful"
|
|
508
|
+
rcall("ZADD", parentUnsuccesssfulChildrenKey, timestamp, childKey)
|
|
509
|
+
moveParentToFailedIfNeeded(
|
|
467
510
|
parentData['queueKey'],
|
|
468
|
-
parentData['queueKey'] .. ':' .. parentData['id'],
|
|
469
|
-
parentData['id'],
|
|
470
511
|
parentKey,
|
|
512
|
+
parentData['id'],
|
|
513
|
+
childKey,
|
|
471
514
|
timestamp
|
|
472
515
|
)
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
516
|
+
end
|
|
517
|
+
elseif parentData['cpof'] then
|
|
518
|
+
if rcall("SREM", parentDependenciesChildrenKey, childKey) == 1 then
|
|
519
|
+
local parentFailedChildrenKey = parentKey .. ":failed"
|
|
520
|
+
rcall("HSET", parentFailedChildrenKey, childKey, failedReason)
|
|
521
|
+
moveParentToWaitIfNeeded(parentData['queueKey'], parentKey, parentData['id'], timestamp)
|
|
522
|
+
end
|
|
523
|
+
elseif parentData['idof'] or parentData['rdof'] then
|
|
524
|
+
if rcall("SREM", parentDependenciesChildrenKey, childKey) == 1 then
|
|
525
|
+
moveParentToWaitIfNoPendingDependencies(parentData['queueKey'], parentDependenciesChildrenKey,
|
|
526
|
+
parentKey, parentData['id'], timestamp)
|
|
527
|
+
if parentData['idof'] then
|
|
528
|
+
local parentFailedChildrenKey = parentKey .. ":failed"
|
|
529
|
+
rcall("HSET", parentFailedChildrenKey, childKey, failedReason)
|
|
483
530
|
end
|
|
484
531
|
end
|
|
485
532
|
end
|
|
486
|
-
local parentRawOpts = jobAttributes[3]
|
|
487
|
-
local parentOpts = cjson.decode(parentRawOpts)
|
|
488
|
-
removeJobsOnFail(parentQueuePrefix, parentFailedKey, parentId, parentOpts, timestamp)
|
|
489
533
|
end
|
|
490
534
|
end
|
|
491
535
|
--[[
|
|
@@ -523,6 +567,8 @@ local function prepareJobForProcessing(keyPrefix, rateLimiterKey, eventStreamKey
|
|
|
523
567
|
rcall("HMSET", jobKey, "processedOn", processedOn, unpack(optionalValues))
|
|
524
568
|
rcall("HINCRBY", jobKey, "ats", 1)
|
|
525
569
|
addBaseMarkerIfNeeded(markerKey, false)
|
|
570
|
+
-- rate limit delay must be 0 in this case to prevent adding more delay
|
|
571
|
+
-- when job that is moved to active needs to be processed
|
|
526
572
|
return {rcall("HGETALL", jobKey), jobId, 0, 0} -- get job data
|
|
527
573
|
end
|
|
528
574
|
--[[
|
|
@@ -544,17 +590,38 @@ local function promoteDelayedJobs(delayedKey, markerKey, targetKey, prioritizedK
|
|
|
544
590
|
tonumber(rcall("HGET", jobKey, "priority")) or 0
|
|
545
591
|
if priority == 0 then
|
|
546
592
|
-- LIFO or FIFO
|
|
547
|
-
|
|
593
|
+
rcall("LPUSH", targetKey, jobId)
|
|
548
594
|
else
|
|
549
|
-
|
|
550
|
-
|
|
595
|
+
local score = getPriorityScore(priority, priorityCounterKey)
|
|
596
|
+
rcall("ZADD", prioritizedKey, score, jobId)
|
|
551
597
|
end
|
|
552
598
|
-- Emit waiting event
|
|
553
599
|
rcall("XADD", eventStreamKey, "*", "event", "waiting", "jobId",
|
|
554
600
|
jobId, "prev", "delayed")
|
|
555
601
|
rcall("HSET", jobKey, "delay", 0)
|
|
556
602
|
end
|
|
603
|
+
addBaseMarkerIfNeeded(markerKey, isPaused)
|
|
604
|
+
end
|
|
605
|
+
end
|
|
606
|
+
--[[
|
|
607
|
+
Function to remove deduplication key if needed
|
|
608
|
+
when a job is moved to completed or failed states.
|
|
609
|
+
]]
|
|
610
|
+
local function removeDeduplicationKeyIfNeededOnFinalization(prefixKey,
|
|
611
|
+
deduplicationId, jobId)
|
|
612
|
+
if deduplicationId then
|
|
613
|
+
local deduplicationKey = prefixKey .. "de:" .. deduplicationId
|
|
614
|
+
local pttl = rcall("PTTL", deduplicationKey)
|
|
615
|
+
if pttl == 0 then
|
|
616
|
+
return rcall("DEL", deduplicationKey)
|
|
617
|
+
end
|
|
618
|
+
if pttl == -1 then
|
|
619
|
+
local currentJobId = rcall('GET', deduplicationKey)
|
|
620
|
+
if currentJobId and currentJobId == jobId then
|
|
621
|
+
return rcall("DEL", deduplicationKey)
|
|
622
|
+
end
|
|
557
623
|
end
|
|
624
|
+
end
|
|
558
625
|
end
|
|
559
626
|
local function removeLock(jobKey, stalledKey, token, jobId)
|
|
560
627
|
if token ~= "0" then
|
|
@@ -583,16 +650,16 @@ end
|
|
|
583
650
|
Function to get max events value or set by default 10000.
|
|
584
651
|
]]
|
|
585
652
|
local function getOrSetMaxEvents(metaKey)
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
653
|
+
local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents")
|
|
654
|
+
if not maxEvents then
|
|
655
|
+
maxEvents = 10000
|
|
656
|
+
rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents)
|
|
657
|
+
end
|
|
658
|
+
return maxEvents
|
|
592
659
|
end
|
|
593
660
|
local function trimEvents(metaKey, eventStreamKey)
|
|
594
661
|
local maxEvents = getOrSetMaxEvents(metaKey)
|
|
595
|
-
if maxEvents
|
|
662
|
+
if maxEvents then
|
|
596
663
|
rcall("XTRIM", eventStreamKey, "MAXLEN", "~", maxEvents)
|
|
597
664
|
else
|
|
598
665
|
rcall("XTRIM", eventStreamKey, "MAXLEN", "~", 10000)
|
|
@@ -606,21 +673,31 @@ local function updateParentDepsIfNeeded(parentKey, parentQueueKey, parentDepende
|
|
|
606
673
|
parentId, jobIdKey, returnvalue, timestamp )
|
|
607
674
|
local processedSet = parentKey .. ":processed"
|
|
608
675
|
rcall("HSET", processedSet, jobIdKey, returnvalue)
|
|
609
|
-
|
|
676
|
+
moveParentToWaitIfNoPendingDependencies(parentQueueKey, parentDependenciesKey, parentKey, parentId, timestamp)
|
|
610
677
|
end
|
|
611
678
|
--[[
|
|
612
679
|
Function to update a bunch of fields in a job.
|
|
613
680
|
]]
|
|
614
681
|
local function updateJobFields(jobKey, msgpackedFields)
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
end
|
|
682
|
+
if msgpackedFields and #msgpackedFields > 0 then
|
|
683
|
+
local fieldsToUpdate = cmsgpack.unpack(msgpackedFields)
|
|
684
|
+
if fieldsToUpdate then
|
|
685
|
+
rcall("HMSET", jobKey, unpack(fieldsToUpdate))
|
|
620
686
|
end
|
|
687
|
+
end
|
|
621
688
|
end
|
|
622
689
|
local jobIdKey = KEYS[12]
|
|
623
|
-
if rcall("EXISTS", jobIdKey) == 1 then --
|
|
690
|
+
if rcall("EXISTS", jobIdKey) == 1 then -- Make sure job exists
|
|
691
|
+
-- Make sure it does not have pending dependencies
|
|
692
|
+
-- It must happen before removing lock
|
|
693
|
+
if ARGV[5] == "completed" then
|
|
694
|
+
if rcall("SCARD", jobIdKey .. ":dependencies") ~= 0 then
|
|
695
|
+
return -4
|
|
696
|
+
end
|
|
697
|
+
if rcall("ZCARD", jobIdKey .. ":unsuccessful") ~= 0 then
|
|
698
|
+
return -9
|
|
699
|
+
end
|
|
700
|
+
end
|
|
624
701
|
local opts = cmsgpack.unpack(ARGV[8])
|
|
625
702
|
local token = opts['token']
|
|
626
703
|
local errorCode = removeLock(jobIdKey, KEYS[5], token, ARGV[1])
|
|
@@ -632,14 +709,11 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists
|
|
|
632
709
|
local maxMetricsSize = opts['maxMetricsSize']
|
|
633
710
|
local maxCount = opts['keepJobs']['count']
|
|
634
711
|
local maxAge = opts['keepJobs']['age']
|
|
635
|
-
if rcall("SCARD", jobIdKey .. ":dependencies") ~= 0 then -- // Make sure it does not have pending dependencies
|
|
636
|
-
return -4
|
|
637
|
-
end
|
|
638
712
|
local jobAttributes = rcall("HMGET", jobIdKey, "parentKey", "parent", "deid")
|
|
639
713
|
local parentKey = jobAttributes[1] or ""
|
|
640
714
|
local parentId = ""
|
|
641
715
|
local parentQueueKey = ""
|
|
642
|
-
if jobAttributes[2]
|
|
716
|
+
if jobAttributes[2] then -- TODO: need to revisit this logic if it's still needed
|
|
643
717
|
local jsonDecodedParent = cjson.decode(jobAttributes[2])
|
|
644
718
|
parentId = jsonDecodedParent['id']
|
|
645
719
|
parentQueueKey = jsonDecodedParent['queueKey']
|
|
@@ -648,13 +722,15 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists
|
|
|
648
722
|
local timestamp = ARGV[2]
|
|
649
723
|
-- Remove from active list (if not active we shall return error)
|
|
650
724
|
local numRemovedElements = rcall("LREM", KEYS[2], -1, jobId)
|
|
651
|
-
if (numRemovedElements < 1) then
|
|
725
|
+
if (numRemovedElements < 1) then
|
|
726
|
+
return -3
|
|
727
|
+
end
|
|
652
728
|
local eventStreamKey = KEYS[4]
|
|
653
729
|
local metaKey = KEYS[9]
|
|
654
730
|
-- Trim events before emiting them to avoid trimming events emitted in this script
|
|
655
731
|
trimEvents(metaKey, eventStreamKey)
|
|
656
732
|
local prefix = ARGV[7]
|
|
657
|
-
|
|
733
|
+
removeDeduplicationKeyIfNeededOnFinalization(prefix, jobAttributes[3], jobId)
|
|
658
734
|
-- If job has a parent we need to
|
|
659
735
|
-- 1) remove this job id from parents dependencies
|
|
660
736
|
-- 2) move the job Id to parent "processed" set
|
|
@@ -668,26 +744,11 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists
|
|
|
668
744
|
if ARGV[5] == "completed" then
|
|
669
745
|
local dependenciesSet = parentKey .. ":dependencies"
|
|
670
746
|
if rcall("SREM", dependenciesSet, jobIdKey) == 1 then
|
|
671
|
-
updateParentDepsIfNeeded(parentKey, parentQueueKey,
|
|
672
|
-
|
|
673
|
-
ARGV[4], timestamp)
|
|
747
|
+
updateParentDepsIfNeeded(parentKey, parentQueueKey, dependenciesSet, parentId, jobIdKey, ARGV[4],
|
|
748
|
+
timestamp)
|
|
674
749
|
end
|
|
675
750
|
else
|
|
676
|
-
|
|
677
|
-
moveParentFromWaitingChildrenToFailed(parentQueueKey, parentKey,
|
|
678
|
-
parentId, jobIdKey,
|
|
679
|
-
timestamp)
|
|
680
|
-
elseif opts['idof'] or opts['rdof'] then
|
|
681
|
-
local dependenciesSet = parentKey .. ":dependencies"
|
|
682
|
-
if rcall("SREM", dependenciesSet, jobIdKey) == 1 then
|
|
683
|
-
moveParentToWaitIfNeeded(parentQueueKey, dependenciesSet,
|
|
684
|
-
parentKey, parentId, timestamp)
|
|
685
|
-
if opts['idof'] then
|
|
686
|
-
local failedSet = parentKey .. ":failed"
|
|
687
|
-
rcall("HSET", failedSet, jobIdKey, ARGV[4])
|
|
688
|
-
end
|
|
689
|
-
end
|
|
690
|
-
end
|
|
751
|
+
moveChildFromDependenciesIfNeeded(jobAttributes[2], jobIdKey, ARGV[4], timestamp)
|
|
691
752
|
end
|
|
692
753
|
end
|
|
693
754
|
local attemptsMade = rcall("HINCRBY", jobIdKey, "atm", 1)
|
|
@@ -696,8 +757,11 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists
|
|
|
696
757
|
local targetSet = KEYS[11]
|
|
697
758
|
-- Add to complete/failed set
|
|
698
759
|
rcall("ZADD", targetSet, timestamp, jobId)
|
|
699
|
-
rcall("
|
|
760
|
+
rcall("HSET", jobIdKey, ARGV[3], ARGV[4], "finishedOn", timestamp)
|
|
700
761
|
-- "returnvalue" / "failedReason" and "finishedOn"
|
|
762
|
+
if ARGV[5] == "failed" then
|
|
763
|
+
rcall("HDEL", jobIdKey, "defa")
|
|
764
|
+
end
|
|
701
765
|
-- Remove old jobs?
|
|
702
766
|
if maxAge ~= nil then
|
|
703
767
|
removeJobsByMaxAge(timestamp, maxAge, targetSet, prefix)
|
|
@@ -714,12 +778,11 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists
|
|
|
714
778
|
removeParentDependencyKey(jobIdKey, false, parentKey, jobAttributes[3])
|
|
715
779
|
end
|
|
716
780
|
end
|
|
717
|
-
rcall("XADD", eventStreamKey, "*", "event", ARGV[5], "jobId", jobId, ARGV[3],
|
|
718
|
-
ARGV[4])
|
|
781
|
+
rcall("XADD", eventStreamKey, "*", "event", ARGV[5], "jobId", jobId, ARGV[3], ARGV[4], "prev", "active")
|
|
719
782
|
if ARGV[5] == "failed" then
|
|
720
783
|
if tonumber(attemptsMade) >= tonumber(attempts) then
|
|
721
|
-
rcall("XADD", eventStreamKey, "*", "event", "retries-exhausted", "jobId",
|
|
722
|
-
|
|
784
|
+
rcall("XADD", eventStreamKey, "*", "event", "retries-exhausted", "jobId", jobId, "attemptsMade",
|
|
785
|
+
attemptsMade)
|
|
723
786
|
end
|
|
724
787
|
end
|
|
725
788
|
-- Collect metrics
|
|
@@ -732,14 +795,18 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists
|
|
|
732
795
|
local target, isPausedOrMaxed = getTargetQueueList(metaKey, KEYS[2], KEYS[1], KEYS[8])
|
|
733
796
|
local markerKey = KEYS[14]
|
|
734
797
|
-- Check if there are delayed jobs that can be promoted
|
|
735
|
-
promoteDelayedJobs(KEYS[7], markerKey, target, KEYS[3], eventStreamKey, prefix,
|
|
736
|
-
|
|
798
|
+
promoteDelayedJobs(KEYS[7], markerKey, target, KEYS[3], eventStreamKey, prefix, timestamp, KEYS[10],
|
|
799
|
+
isPausedOrMaxed)
|
|
737
800
|
local maxJobs = tonumber(opts['limiter'] and opts['limiter']['max'])
|
|
738
801
|
-- Check if we are rate limited first.
|
|
739
802
|
local expireTime = getRateLimitTTL(maxJobs, KEYS[6])
|
|
740
|
-
if expireTime > 0 then
|
|
803
|
+
if expireTime > 0 then
|
|
804
|
+
return {0, 0, expireTime, 0}
|
|
805
|
+
end
|
|
741
806
|
-- paused or maxed queue
|
|
742
|
-
if isPausedOrMaxed then
|
|
807
|
+
if isPausedOrMaxed then
|
|
808
|
+
return {0, 0, 0, 0}
|
|
809
|
+
end
|
|
743
810
|
jobId = rcall("RPOPLPUSH", KEYS[1], KEYS[2])
|
|
744
811
|
if jobId then
|
|
745
812
|
-- Markers in waitlist DEPRECATED in v5: Remove in v6.
|
|
@@ -748,23 +815,19 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists
|
|
|
748
815
|
-- If jobId is special ID 0:delay (delay greater than 0), then there is no job to process
|
|
749
816
|
-- but if ID is 0:0, then there is at least 1 prioritized job to process
|
|
750
817
|
if jobId == "0:0" then
|
|
751
|
-
jobId =
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
timestamp, maxJobs, markerKey,
|
|
755
|
-
opts)
|
|
818
|
+
jobId = moveJobFromPrioritizedToActive(KEYS[3], KEYS[2], KEYS[10])
|
|
819
|
+
return prepareJobForProcessing(prefix, KEYS[6], eventStreamKey, jobId, timestamp, maxJobs,
|
|
820
|
+
markerKey, opts)
|
|
756
821
|
end
|
|
757
822
|
else
|
|
758
|
-
return prepareJobForProcessing(prefix, KEYS[6], eventStreamKey, jobId,
|
|
759
|
-
|
|
760
|
-
opts)
|
|
823
|
+
return prepareJobForProcessing(prefix, KEYS[6], eventStreamKey, jobId, timestamp, maxJobs, markerKey,
|
|
824
|
+
opts)
|
|
761
825
|
end
|
|
762
826
|
else
|
|
763
|
-
jobId =
|
|
827
|
+
jobId = moveJobFromPrioritizedToActive(KEYS[3], KEYS[2], KEYS[10])
|
|
764
828
|
if jobId then
|
|
765
|
-
return prepareJobForProcessing(prefix, KEYS[6], eventStreamKey, jobId,
|
|
766
|
-
|
|
767
|
-
opts)
|
|
829
|
+
return prepareJobForProcessing(prefix, KEYS[6], eventStreamKey, jobId, timestamp, maxJobs, markerKey,
|
|
830
|
+
opts)
|
|
768
831
|
end
|
|
769
832
|
end
|
|
770
833
|
-- Return the timestamp for the next delayed job if any.
|