@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
|
@@ -34,15 +34,18 @@ const content = `--[[
|
|
|
34
34
|
opts - attempts max attempts
|
|
35
35
|
opts - maxMetricsSize
|
|
36
36
|
opts - fpof - fail parent on fail
|
|
37
|
+
opts - cpof - continue parent on fail
|
|
37
38
|
opts - idof - ignore dependency on fail
|
|
38
39
|
opts - rdof - remove dependency on fail
|
|
40
|
+
opts - name - worker name
|
|
39
41
|
Output:
|
|
40
42
|
0 OK
|
|
41
43
|
-1 Missing key.
|
|
42
44
|
-2 Missing lock.
|
|
43
45
|
-3 Job not in active set
|
|
44
|
-
-4 Job has pending
|
|
46
|
+
-4 Job has pending children
|
|
45
47
|
-6 Lock is not owned by this client
|
|
48
|
+
-9 Job has failed children
|
|
46
49
|
Events:
|
|
47
50
|
'completed/failed'
|
|
48
51
|
]]
|
|
@@ -51,7 +54,7 @@ local rcall = redis.call
|
|
|
51
54
|
--[[
|
|
52
55
|
Functions to collect metrics based on a current and previous count of jobs.
|
|
53
56
|
Granualarity is fixed at 1 minute.
|
|
54
|
-
]]
|
|
57
|
+
]]
|
|
55
58
|
--[[
|
|
56
59
|
Function to loop in batches.
|
|
57
60
|
Just a bit of warning, some commands as ZREM
|
|
@@ -109,7 +112,7 @@ local function getNextDelayedTimestamp(delayedKey)
|
|
|
109
112
|
local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES")
|
|
110
113
|
if #result then
|
|
111
114
|
local nextTimestamp = tonumber(result[2])
|
|
112
|
-
if nextTimestamp ~= nil then
|
|
115
|
+
if nextTimestamp ~= nil then
|
|
113
116
|
return nextTimestamp / 0x1000
|
|
114
117
|
end
|
|
115
118
|
end
|
|
@@ -152,7 +155,7 @@ end
|
|
|
152
155
|
--[[
|
|
153
156
|
Function to move job from prioritized state to active.
|
|
154
157
|
]]
|
|
155
|
-
local function
|
|
158
|
+
local function moveJobFromPrioritizedToActive(priorityKey, activeKey, priorityCounterKey)
|
|
156
159
|
local prioritizedJob = rcall("ZPOPMIN", priorityKey)
|
|
157
160
|
if #prioritizedJob > 0 then
|
|
158
161
|
rcall("LPUSH", activeKey, prioritizedJob[1])
|
|
@@ -166,7 +169,16 @@ end
|
|
|
166
169
|
]]
|
|
167
170
|
-- Includes
|
|
168
171
|
--[[
|
|
169
|
-
Validate and move parent to
|
|
172
|
+
Validate and move parent to a wait status (waiting, delayed or prioritized)
|
|
173
|
+
if no pending dependencies.
|
|
174
|
+
]]
|
|
175
|
+
-- Includes
|
|
176
|
+
--[[
|
|
177
|
+
Validate and move parent to a wait status (waiting, delayed or prioritized) if needed.
|
|
178
|
+
]]
|
|
179
|
+
-- Includes
|
|
180
|
+
--[[
|
|
181
|
+
Move parent to a wait status (wait, prioritized or delayed)
|
|
170
182
|
]]
|
|
171
183
|
-- Includes
|
|
172
184
|
--[[
|
|
@@ -201,10 +213,16 @@ end
|
|
|
201
213
|
Function to add job considering priority.
|
|
202
214
|
]]
|
|
203
215
|
-- Includes
|
|
216
|
+
--[[
|
|
217
|
+
Function to get priority score.
|
|
218
|
+
]]
|
|
219
|
+
local function getPriorityScore(priority, priorityCounterKey)
|
|
220
|
+
local prioCounter = rcall("INCR", priorityCounterKey)
|
|
221
|
+
return priority * 0x100000000 + prioCounter % 0x100000000
|
|
222
|
+
end
|
|
204
223
|
local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey,
|
|
205
224
|
isPausedOrMaxed)
|
|
206
|
-
local
|
|
207
|
-
local score = priority * 0x100000000 + prioCounter % 0x100000000
|
|
225
|
+
local score = getPriorityScore(priority, priorityCounterKey)
|
|
208
226
|
rcall("ZADD", prioritizedKey, score, jobId)
|
|
209
227
|
addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed)
|
|
210
228
|
end
|
|
@@ -224,58 +242,53 @@ local function isQueuePausedOrMaxed(queueMetaKey, activeKey)
|
|
|
224
242
|
end
|
|
225
243
|
return false
|
|
226
244
|
end
|
|
227
|
-
local function
|
|
228
|
-
|
|
229
|
-
local
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
local
|
|
238
|
-
local
|
|
239
|
-
local
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
245
|
+
local function moveParentToWait(parentQueueKey, parentKey, parentId, timestamp)
|
|
246
|
+
local parentWaitKey = parentQueueKey .. ":wait"
|
|
247
|
+
local parentPausedKey = parentQueueKey .. ":paused"
|
|
248
|
+
local parentActiveKey = parentQueueKey .. ":active"
|
|
249
|
+
local parentMetaKey = parentQueueKey .. ":meta"
|
|
250
|
+
local parentMarkerKey = parentQueueKey .. ":marker"
|
|
251
|
+
local jobAttributes = rcall("HMGET", parentKey, "priority", "delay")
|
|
252
|
+
local priority = tonumber(jobAttributes[1]) or 0
|
|
253
|
+
local delay = tonumber(jobAttributes[2]) or 0
|
|
254
|
+
if delay > 0 then
|
|
255
|
+
local delayedTimestamp = tonumber(timestamp) + delay
|
|
256
|
+
local score = delayedTimestamp * 0x1000
|
|
257
|
+
local parentDelayedKey = parentQueueKey .. ":delayed"
|
|
258
|
+
rcall("ZADD", parentDelayedKey, score, parentId)
|
|
259
|
+
rcall("XADD", parentQueueKey .. ":events", "*", "event", "delayed", "jobId", parentId, "delay",
|
|
260
|
+
delayedTimestamp)
|
|
261
|
+
addDelayMarkerIfNeeded(parentMarkerKey, parentDelayedKey)
|
|
262
|
+
else
|
|
263
|
+
if priority == 0 then
|
|
264
|
+
local parentTarget, isParentPausedOrMaxed = getTargetQueueList(parentMetaKey, parentActiveKey,
|
|
265
|
+
parentWaitKey, parentPausedKey)
|
|
266
|
+
addJobInTargetList(parentTarget, parentMarkerKey, "RPUSH", isParentPausedOrMaxed, parentId)
|
|
249
267
|
else
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
parentPausedKey)
|
|
254
|
-
addJobInTargetList(parentTarget, parentMarkerKey, "RPUSH", isParentPausedOrMaxed,
|
|
255
|
-
parentId)
|
|
256
|
-
else
|
|
257
|
-
local isPausedOrMaxed = isQueuePausedOrMaxed(parentMetaKey, parentActiveKey)
|
|
258
|
-
addJobWithPriority(parentMarkerKey,
|
|
259
|
-
parentQueueKey .. ":prioritized", priority,
|
|
260
|
-
parentId, parentQueueKey .. ":pc", isPausedOrMaxed)
|
|
261
|
-
end
|
|
262
|
-
rcall("XADD", parentQueueKey .. ":events", "*", "event", "waiting",
|
|
263
|
-
"jobId", parentId, "prev", "waiting-children")
|
|
268
|
+
local isPausedOrMaxed = isQueuePausedOrMaxed(parentMetaKey, parentActiveKey)
|
|
269
|
+
addJobWithPriority(parentMarkerKey, parentQueueKey .. ":prioritized", priority, parentId,
|
|
270
|
+
parentQueueKey .. ":pc", isPausedOrMaxed)
|
|
264
271
|
end
|
|
272
|
+
rcall("XADD", parentQueueKey .. ":events", "*", "event", "waiting", "jobId", parentId, "prev",
|
|
273
|
+
"waiting-children")
|
|
265
274
|
end
|
|
266
275
|
end
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
local pttl = rcall("PTTL", deduplicationKey)
|
|
274
|
-
if pttl == 0 or pttl == -1 then
|
|
275
|
-
rcall("DEL", deduplicationKey)
|
|
276
|
+
local function moveParentToWaitIfNeeded(parentQueueKey, parentKey, parentId, timestamp)
|
|
277
|
+
if rcall("EXISTS", parentKey) == 1 then
|
|
278
|
+
local parentWaitingChildrenKey = parentQueueKey .. ":waiting-children"
|
|
279
|
+
if rcall("ZSCORE", parentWaitingChildrenKey, parentId) then
|
|
280
|
+
rcall("ZREM", parentWaitingChildrenKey, parentId)
|
|
281
|
+
moveParentToWait(parentQueueKey, parentKey, parentId, timestamp)
|
|
276
282
|
end
|
|
277
283
|
end
|
|
278
284
|
end
|
|
285
|
+
local function moveParentToWaitIfNoPendingDependencies(parentQueueKey, parentDependenciesKey, parentKey,
|
|
286
|
+
parentId, timestamp)
|
|
287
|
+
local doNotHavePendingDependencies = rcall("SCARD", parentDependenciesKey) == 0
|
|
288
|
+
if doNotHavePendingDependencies then
|
|
289
|
+
moveParentToWaitIfNeeded(parentQueueKey, parentKey, parentId, timestamp)
|
|
290
|
+
end
|
|
291
|
+
end
|
|
279
292
|
--[[
|
|
280
293
|
Functions to remove jobs when removeOnFail option is provided.
|
|
281
294
|
]]
|
|
@@ -285,21 +298,26 @@ end
|
|
|
285
298
|
]]
|
|
286
299
|
-- Includes
|
|
287
300
|
--[[
|
|
288
|
-
Function to remove deduplication key
|
|
301
|
+
Function to remove deduplication key if needed
|
|
302
|
+
when a job is being removed.
|
|
289
303
|
]]
|
|
290
|
-
local function
|
|
304
|
+
local function removeDeduplicationKeyIfNeededOnRemoval(prefixKey,
|
|
305
|
+
jobKey, jobId)
|
|
291
306
|
local deduplicationId = rcall("HGET", jobKey, "deid")
|
|
292
307
|
if deduplicationId then
|
|
293
308
|
local deduplicationKey = prefixKey .. "de:" .. deduplicationId
|
|
294
|
-
rcall(
|
|
309
|
+
local currentJobId = rcall('GET', deduplicationKey)
|
|
310
|
+
if currentJobId and currentJobId == jobId then
|
|
311
|
+
return rcall("DEL", deduplicationKey)
|
|
312
|
+
end
|
|
295
313
|
end
|
|
296
314
|
end
|
|
297
315
|
--[[
|
|
298
316
|
Function to remove job keys.
|
|
299
317
|
]]
|
|
300
318
|
local function removeJobKeys(jobKey)
|
|
301
|
-
return rcall("DEL", jobKey, jobKey .. ':logs',
|
|
302
|
-
jobKey .. ':
|
|
319
|
+
return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies',
|
|
320
|
+
jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful')
|
|
303
321
|
end
|
|
304
322
|
--[[
|
|
305
323
|
Check if this job has a parent. If so we will just remove it from
|
|
@@ -317,7 +335,7 @@ end
|
|
|
317
335
|
local getJobKeyPrefix = function (jobKey, jobId)
|
|
318
336
|
return string.sub(jobKey, 0, #jobKey - #jobId)
|
|
319
337
|
end
|
|
320
|
-
local function
|
|
338
|
+
local function _moveParentToWait(parentPrefix, parentId, emitEvent)
|
|
321
339
|
local parentTarget, isPausedOrMaxed = getTargetQueueList(parentPrefix .. "meta", parentPrefix .. "active",
|
|
322
340
|
parentPrefix .. "wait", parentPrefix .. "paused")
|
|
323
341
|
addJobInTargetList(parentTarget, parentPrefix .. "marker", "RPUSH", isPausedOrMaxed, parentId)
|
|
@@ -345,10 +363,10 @@ local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debou
|
|
|
345
363
|
rcall("DEL", parentPrefix .. "de:" .. debounceId)
|
|
346
364
|
end
|
|
347
365
|
else
|
|
348
|
-
|
|
366
|
+
_moveParentToWait(parentPrefix, parentId)
|
|
349
367
|
end
|
|
350
368
|
else
|
|
351
|
-
|
|
369
|
+
_moveParentToWait(parentPrefix, parentId, true)
|
|
352
370
|
end
|
|
353
371
|
end
|
|
354
372
|
end
|
|
@@ -376,10 +394,10 @@ local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debou
|
|
|
376
394
|
rcall("DEL", parentPrefix .. "de:" .. parentAttributes[2])
|
|
377
395
|
end
|
|
378
396
|
else
|
|
379
|
-
|
|
397
|
+
_moveParentToWait(parentPrefix, parentId)
|
|
380
398
|
end
|
|
381
399
|
else
|
|
382
|
-
|
|
400
|
+
_moveParentToWait(parentPrefix, parentId, true)
|
|
383
401
|
end
|
|
384
402
|
end
|
|
385
403
|
end
|
|
@@ -393,7 +411,7 @@ local function removeJob(jobId, hard, baseKey, shouldRemoveDeduplicationKey)
|
|
|
393
411
|
local jobKey = baseKey .. jobId
|
|
394
412
|
removeParentDependencyKey(jobKey, hard, nil, baseKey)
|
|
395
413
|
if shouldRemoveDeduplicationKey then
|
|
396
|
-
|
|
414
|
+
removeDeduplicationKeyIfNeededOnRemoval(baseKey, jobKey, jobId)
|
|
397
415
|
end
|
|
398
416
|
removeJobKeys(jobKey)
|
|
399
417
|
end
|
|
@@ -446,43 +464,69 @@ local function removeJobsOnFail(queueKeyPrefix, failedKey, jobId, opts, timestam
|
|
|
446
464
|
end
|
|
447
465
|
end
|
|
448
466
|
end
|
|
449
|
-
local function
|
|
450
|
-
if rcall("
|
|
451
|
-
local
|
|
452
|
-
local
|
|
453
|
-
|
|
454
|
-
local
|
|
455
|
-
|
|
456
|
-
rcall("
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
467
|
+
local moveParentToFailedIfNeeded = function (parentQueueKey, parentKey, parentId, jobIdKey, timestamp)
|
|
468
|
+
if rcall("EXISTS", parentKey) == 1 then
|
|
469
|
+
local parentWaitingChildrenKey = parentQueueKey .. ":waiting-children"
|
|
470
|
+
local parentDelayedKey = parentQueueKey .. ":delayed"
|
|
471
|
+
local parentPrioritizedKey = parentQueueKey .. ":prioritized"
|
|
472
|
+
local parentWaitingChildrenOrDelayedKey
|
|
473
|
+
local prevState
|
|
474
|
+
if rcall("ZSCORE", parentWaitingChildrenKey, parentId) then
|
|
475
|
+
parentWaitingChildrenOrDelayedKey = parentWaitingChildrenKey
|
|
476
|
+
prevState = "waiting-children"
|
|
477
|
+
elseif rcall("ZSCORE", parentDelayedKey, parentId) then
|
|
478
|
+
parentWaitingChildrenOrDelayedKey = parentDelayedKey
|
|
479
|
+
prevState = "delayed"
|
|
480
|
+
rcall("HSET", parentKey, "delay", 0)
|
|
481
|
+
end
|
|
482
|
+
if parentWaitingChildrenOrDelayedKey then
|
|
483
|
+
rcall("ZREM", parentWaitingChildrenOrDelayedKey, parentId)
|
|
484
|
+
local parentQueuePrefix = parentQueueKey .. ":"
|
|
485
|
+
local parentFailedKey = parentQueueKey .. ":failed"
|
|
486
|
+
local deferredFailure = "child " .. jobIdKey .. " failed"
|
|
487
|
+
rcall("HSET", parentKey, "defa", deferredFailure)
|
|
488
|
+
moveParentToWait(parentQueueKey, parentKey, parentId, timestamp)
|
|
489
|
+
else
|
|
490
|
+
if not rcall("ZSCORE", parentQueueKey .. ":failed", parentId) then
|
|
491
|
+
local deferredFailure = "child " .. jobIdKey .. " failed"
|
|
492
|
+
rcall("HSET", parentKey, "defa", deferredFailure)
|
|
493
|
+
end
|
|
494
|
+
end
|
|
495
|
+
end
|
|
496
|
+
end
|
|
497
|
+
local moveChildFromDependenciesIfNeeded = function (rawParentData, childKey, failedReason, timestamp)
|
|
498
|
+
if rawParentData then
|
|
499
|
+
local parentData = cjson.decode(rawParentData)
|
|
500
|
+
local parentKey = parentData['queueKey'] .. ':' .. parentData['id']
|
|
501
|
+
local parentDependenciesChildrenKey = parentKey .. ":dependencies"
|
|
502
|
+
if parentData['fpof'] then
|
|
503
|
+
if rcall("SREM", parentDependenciesChildrenKey, childKey) == 1 then
|
|
504
|
+
local parentUnsuccesssfulChildrenKey = parentKey .. ":unsuccessful"
|
|
505
|
+
rcall("ZADD", parentUnsuccesssfulChildrenKey, timestamp, childKey)
|
|
506
|
+
moveParentToFailedIfNeeded(
|
|
464
507
|
parentData['queueKey'],
|
|
465
|
-
parentData['queueKey'] .. ':' .. parentData['id'],
|
|
466
|
-
parentData['id'],
|
|
467
508
|
parentKey,
|
|
509
|
+
parentData['id'],
|
|
510
|
+
childKey,
|
|
468
511
|
timestamp
|
|
469
512
|
)
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
513
|
+
end
|
|
514
|
+
elseif parentData['cpof'] then
|
|
515
|
+
if rcall("SREM", parentDependenciesChildrenKey, childKey) == 1 then
|
|
516
|
+
local parentFailedChildrenKey = parentKey .. ":failed"
|
|
517
|
+
rcall("HSET", parentFailedChildrenKey, childKey, failedReason)
|
|
518
|
+
moveParentToWaitIfNeeded(parentData['queueKey'], parentKey, parentData['id'], timestamp)
|
|
519
|
+
end
|
|
520
|
+
elseif parentData['idof'] or parentData['rdof'] then
|
|
521
|
+
if rcall("SREM", parentDependenciesChildrenKey, childKey) == 1 then
|
|
522
|
+
moveParentToWaitIfNoPendingDependencies(parentData['queueKey'], parentDependenciesChildrenKey,
|
|
523
|
+
parentKey, parentData['id'], timestamp)
|
|
524
|
+
if parentData['idof'] then
|
|
525
|
+
local parentFailedChildrenKey = parentKey .. ":failed"
|
|
526
|
+
rcall("HSET", parentFailedChildrenKey, childKey, failedReason)
|
|
480
527
|
end
|
|
481
528
|
end
|
|
482
529
|
end
|
|
483
|
-
local parentRawOpts = jobAttributes[3]
|
|
484
|
-
local parentOpts = cjson.decode(parentRawOpts)
|
|
485
|
-
removeJobsOnFail(parentQueuePrefix, parentFailedKey, parentId, parentOpts, timestamp)
|
|
486
530
|
end
|
|
487
531
|
end
|
|
488
532
|
--[[
|
|
@@ -520,6 +564,8 @@ local function prepareJobForProcessing(keyPrefix, rateLimiterKey, eventStreamKey
|
|
|
520
564
|
rcall("HMSET", jobKey, "processedOn", processedOn, unpack(optionalValues))
|
|
521
565
|
rcall("HINCRBY", jobKey, "ats", 1)
|
|
522
566
|
addBaseMarkerIfNeeded(markerKey, false)
|
|
567
|
+
-- rate limit delay must be 0 in this case to prevent adding more delay
|
|
568
|
+
-- when job that is moved to active needs to be processed
|
|
523
569
|
return {rcall("HGETALL", jobKey), jobId, 0, 0} -- get job data
|
|
524
570
|
end
|
|
525
571
|
--[[
|
|
@@ -541,17 +587,38 @@ local function promoteDelayedJobs(delayedKey, markerKey, targetKey, prioritizedK
|
|
|
541
587
|
tonumber(rcall("HGET", jobKey, "priority")) or 0
|
|
542
588
|
if priority == 0 then
|
|
543
589
|
-- LIFO or FIFO
|
|
544
|
-
|
|
590
|
+
rcall("LPUSH", targetKey, jobId)
|
|
545
591
|
else
|
|
546
|
-
|
|
547
|
-
|
|
592
|
+
local score = getPriorityScore(priority, priorityCounterKey)
|
|
593
|
+
rcall("ZADD", prioritizedKey, score, jobId)
|
|
548
594
|
end
|
|
549
595
|
-- Emit waiting event
|
|
550
596
|
rcall("XADD", eventStreamKey, "*", "event", "waiting", "jobId",
|
|
551
597
|
jobId, "prev", "delayed")
|
|
552
598
|
rcall("HSET", jobKey, "delay", 0)
|
|
553
599
|
end
|
|
600
|
+
addBaseMarkerIfNeeded(markerKey, isPaused)
|
|
601
|
+
end
|
|
602
|
+
end
|
|
603
|
+
--[[
|
|
604
|
+
Function to remove deduplication key if needed
|
|
605
|
+
when a job is moved to completed or failed states.
|
|
606
|
+
]]
|
|
607
|
+
local function removeDeduplicationKeyIfNeededOnFinalization(prefixKey,
|
|
608
|
+
deduplicationId, jobId)
|
|
609
|
+
if deduplicationId then
|
|
610
|
+
local deduplicationKey = prefixKey .. "de:" .. deduplicationId
|
|
611
|
+
local pttl = rcall("PTTL", deduplicationKey)
|
|
612
|
+
if pttl == 0 then
|
|
613
|
+
return rcall("DEL", deduplicationKey)
|
|
614
|
+
end
|
|
615
|
+
if pttl == -1 then
|
|
616
|
+
local currentJobId = rcall('GET', deduplicationKey)
|
|
617
|
+
if currentJobId and currentJobId == jobId then
|
|
618
|
+
return rcall("DEL", deduplicationKey)
|
|
619
|
+
end
|
|
554
620
|
end
|
|
621
|
+
end
|
|
555
622
|
end
|
|
556
623
|
local function removeLock(jobKey, stalledKey, token, jobId)
|
|
557
624
|
if token ~= "0" then
|
|
@@ -580,16 +647,16 @@ end
|
|
|
580
647
|
Function to get max events value or set by default 10000.
|
|
581
648
|
]]
|
|
582
649
|
local function getOrSetMaxEvents(metaKey)
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
650
|
+
local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents")
|
|
651
|
+
if not maxEvents then
|
|
652
|
+
maxEvents = 10000
|
|
653
|
+
rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents)
|
|
654
|
+
end
|
|
655
|
+
return maxEvents
|
|
589
656
|
end
|
|
590
657
|
local function trimEvents(metaKey, eventStreamKey)
|
|
591
658
|
local maxEvents = getOrSetMaxEvents(metaKey)
|
|
592
|
-
if maxEvents
|
|
659
|
+
if maxEvents then
|
|
593
660
|
rcall("XTRIM", eventStreamKey, "MAXLEN", "~", maxEvents)
|
|
594
661
|
else
|
|
595
662
|
rcall("XTRIM", eventStreamKey, "MAXLEN", "~", 10000)
|
|
@@ -603,21 +670,31 @@ local function updateParentDepsIfNeeded(parentKey, parentQueueKey, parentDepende
|
|
|
603
670
|
parentId, jobIdKey, returnvalue, timestamp )
|
|
604
671
|
local processedSet = parentKey .. ":processed"
|
|
605
672
|
rcall("HSET", processedSet, jobIdKey, returnvalue)
|
|
606
|
-
|
|
673
|
+
moveParentToWaitIfNoPendingDependencies(parentQueueKey, parentDependenciesKey, parentKey, parentId, timestamp)
|
|
607
674
|
end
|
|
608
675
|
--[[
|
|
609
676
|
Function to update a bunch of fields in a job.
|
|
610
677
|
]]
|
|
611
678
|
local function updateJobFields(jobKey, msgpackedFields)
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
end
|
|
679
|
+
if msgpackedFields and #msgpackedFields > 0 then
|
|
680
|
+
local fieldsToUpdate = cmsgpack.unpack(msgpackedFields)
|
|
681
|
+
if fieldsToUpdate then
|
|
682
|
+
rcall("HMSET", jobKey, unpack(fieldsToUpdate))
|
|
617
683
|
end
|
|
684
|
+
end
|
|
618
685
|
end
|
|
619
686
|
local jobIdKey = KEYS[12]
|
|
620
|
-
if rcall("EXISTS", jobIdKey) == 1 then --
|
|
687
|
+
if rcall("EXISTS", jobIdKey) == 1 then -- Make sure job exists
|
|
688
|
+
-- Make sure it does not have pending dependencies
|
|
689
|
+
-- It must happen before removing lock
|
|
690
|
+
if ARGV[5] == "completed" then
|
|
691
|
+
if rcall("SCARD", jobIdKey .. ":dependencies") ~= 0 then
|
|
692
|
+
return -4
|
|
693
|
+
end
|
|
694
|
+
if rcall("ZCARD", jobIdKey .. ":unsuccessful") ~= 0 then
|
|
695
|
+
return -9
|
|
696
|
+
end
|
|
697
|
+
end
|
|
621
698
|
local opts = cmsgpack.unpack(ARGV[8])
|
|
622
699
|
local token = opts['token']
|
|
623
700
|
local errorCode = removeLock(jobIdKey, KEYS[5], token, ARGV[1])
|
|
@@ -629,14 +706,11 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists
|
|
|
629
706
|
local maxMetricsSize = opts['maxMetricsSize']
|
|
630
707
|
local maxCount = opts['keepJobs']['count']
|
|
631
708
|
local maxAge = opts['keepJobs']['age']
|
|
632
|
-
if rcall("SCARD", jobIdKey .. ":dependencies") ~= 0 then -- // Make sure it does not have pending dependencies
|
|
633
|
-
return -4
|
|
634
|
-
end
|
|
635
709
|
local jobAttributes = rcall("HMGET", jobIdKey, "parentKey", "parent", "deid")
|
|
636
710
|
local parentKey = jobAttributes[1] or ""
|
|
637
711
|
local parentId = ""
|
|
638
712
|
local parentQueueKey = ""
|
|
639
|
-
if jobAttributes[2]
|
|
713
|
+
if jobAttributes[2] then -- TODO: need to revisit this logic if it's still needed
|
|
640
714
|
local jsonDecodedParent = cjson.decode(jobAttributes[2])
|
|
641
715
|
parentId = jsonDecodedParent['id']
|
|
642
716
|
parentQueueKey = jsonDecodedParent['queueKey']
|
|
@@ -645,13 +719,15 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists
|
|
|
645
719
|
local timestamp = ARGV[2]
|
|
646
720
|
-- Remove from active list (if not active we shall return error)
|
|
647
721
|
local numRemovedElements = rcall("LREM", KEYS[2], -1, jobId)
|
|
648
|
-
if (numRemovedElements < 1) then
|
|
722
|
+
if (numRemovedElements < 1) then
|
|
723
|
+
return -3
|
|
724
|
+
end
|
|
649
725
|
local eventStreamKey = KEYS[4]
|
|
650
726
|
local metaKey = KEYS[9]
|
|
651
727
|
-- Trim events before emiting them to avoid trimming events emitted in this script
|
|
652
728
|
trimEvents(metaKey, eventStreamKey)
|
|
653
729
|
local prefix = ARGV[7]
|
|
654
|
-
|
|
730
|
+
removeDeduplicationKeyIfNeededOnFinalization(prefix, jobAttributes[3], jobId)
|
|
655
731
|
-- If job has a parent we need to
|
|
656
732
|
-- 1) remove this job id from parents dependencies
|
|
657
733
|
-- 2) move the job Id to parent "processed" set
|
|
@@ -665,26 +741,11 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists
|
|
|
665
741
|
if ARGV[5] == "completed" then
|
|
666
742
|
local dependenciesSet = parentKey .. ":dependencies"
|
|
667
743
|
if rcall("SREM", dependenciesSet, jobIdKey) == 1 then
|
|
668
|
-
updateParentDepsIfNeeded(parentKey, parentQueueKey,
|
|
669
|
-
|
|
670
|
-
ARGV[4], timestamp)
|
|
744
|
+
updateParentDepsIfNeeded(parentKey, parentQueueKey, dependenciesSet, parentId, jobIdKey, ARGV[4],
|
|
745
|
+
timestamp)
|
|
671
746
|
end
|
|
672
747
|
else
|
|
673
|
-
|
|
674
|
-
moveParentFromWaitingChildrenToFailed(parentQueueKey, parentKey,
|
|
675
|
-
parentId, jobIdKey,
|
|
676
|
-
timestamp)
|
|
677
|
-
elseif opts['idof'] or opts['rdof'] then
|
|
678
|
-
local dependenciesSet = parentKey .. ":dependencies"
|
|
679
|
-
if rcall("SREM", dependenciesSet, jobIdKey) == 1 then
|
|
680
|
-
moveParentToWaitIfNeeded(parentQueueKey, dependenciesSet,
|
|
681
|
-
parentKey, parentId, timestamp)
|
|
682
|
-
if opts['idof'] then
|
|
683
|
-
local failedSet = parentKey .. ":failed"
|
|
684
|
-
rcall("HSET", failedSet, jobIdKey, ARGV[4])
|
|
685
|
-
end
|
|
686
|
-
end
|
|
687
|
-
end
|
|
748
|
+
moveChildFromDependenciesIfNeeded(jobAttributes[2], jobIdKey, ARGV[4], timestamp)
|
|
688
749
|
end
|
|
689
750
|
end
|
|
690
751
|
local attemptsMade = rcall("HINCRBY", jobIdKey, "atm", 1)
|
|
@@ -693,8 +754,11 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists
|
|
|
693
754
|
local targetSet = KEYS[11]
|
|
694
755
|
-- Add to complete/failed set
|
|
695
756
|
rcall("ZADD", targetSet, timestamp, jobId)
|
|
696
|
-
rcall("
|
|
757
|
+
rcall("HSET", jobIdKey, ARGV[3], ARGV[4], "finishedOn", timestamp)
|
|
697
758
|
-- "returnvalue" / "failedReason" and "finishedOn"
|
|
759
|
+
if ARGV[5] == "failed" then
|
|
760
|
+
rcall("HDEL", jobIdKey, "defa")
|
|
761
|
+
end
|
|
698
762
|
-- Remove old jobs?
|
|
699
763
|
if maxAge ~= nil then
|
|
700
764
|
removeJobsByMaxAge(timestamp, maxAge, targetSet, prefix)
|
|
@@ -711,12 +775,11 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists
|
|
|
711
775
|
removeParentDependencyKey(jobIdKey, false, parentKey, jobAttributes[3])
|
|
712
776
|
end
|
|
713
777
|
end
|
|
714
|
-
rcall("XADD", eventStreamKey, "*", "event", ARGV[5], "jobId", jobId, ARGV[3],
|
|
715
|
-
ARGV[4])
|
|
778
|
+
rcall("XADD", eventStreamKey, "*", "event", ARGV[5], "jobId", jobId, ARGV[3], ARGV[4], "prev", "active")
|
|
716
779
|
if ARGV[5] == "failed" then
|
|
717
780
|
if tonumber(attemptsMade) >= tonumber(attempts) then
|
|
718
|
-
rcall("XADD", eventStreamKey, "*", "event", "retries-exhausted", "jobId",
|
|
719
|
-
|
|
781
|
+
rcall("XADD", eventStreamKey, "*", "event", "retries-exhausted", "jobId", jobId, "attemptsMade",
|
|
782
|
+
attemptsMade)
|
|
720
783
|
end
|
|
721
784
|
end
|
|
722
785
|
-- Collect metrics
|
|
@@ -729,14 +792,18 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists
|
|
|
729
792
|
local target, isPausedOrMaxed = getTargetQueueList(metaKey, KEYS[2], KEYS[1], KEYS[8])
|
|
730
793
|
local markerKey = KEYS[14]
|
|
731
794
|
-- Check if there are delayed jobs that can be promoted
|
|
732
|
-
promoteDelayedJobs(KEYS[7], markerKey, target, KEYS[3], eventStreamKey, prefix,
|
|
733
|
-
|
|
795
|
+
promoteDelayedJobs(KEYS[7], markerKey, target, KEYS[3], eventStreamKey, prefix, timestamp, KEYS[10],
|
|
796
|
+
isPausedOrMaxed)
|
|
734
797
|
local maxJobs = tonumber(opts['limiter'] and opts['limiter']['max'])
|
|
735
798
|
-- Check if we are rate limited first.
|
|
736
799
|
local expireTime = getRateLimitTTL(maxJobs, KEYS[6])
|
|
737
|
-
if expireTime > 0 then
|
|
800
|
+
if expireTime > 0 then
|
|
801
|
+
return {0, 0, expireTime, 0}
|
|
802
|
+
end
|
|
738
803
|
-- paused or maxed queue
|
|
739
|
-
if isPausedOrMaxed then
|
|
804
|
+
if isPausedOrMaxed then
|
|
805
|
+
return {0, 0, 0, 0}
|
|
806
|
+
end
|
|
740
807
|
jobId = rcall("RPOPLPUSH", KEYS[1], KEYS[2])
|
|
741
808
|
if jobId then
|
|
742
809
|
-- Markers in waitlist DEPRECATED in v5: Remove in v6.
|
|
@@ -745,23 +812,19 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists
|
|
|
745
812
|
-- If jobId is special ID 0:delay (delay greater than 0), then there is no job to process
|
|
746
813
|
-- but if ID is 0:0, then there is at least 1 prioritized job to process
|
|
747
814
|
if jobId == "0:0" then
|
|
748
|
-
jobId =
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
timestamp, maxJobs, markerKey,
|
|
752
|
-
opts)
|
|
815
|
+
jobId = moveJobFromPrioritizedToActive(KEYS[3], KEYS[2], KEYS[10])
|
|
816
|
+
return prepareJobForProcessing(prefix, KEYS[6], eventStreamKey, jobId, timestamp, maxJobs,
|
|
817
|
+
markerKey, opts)
|
|
753
818
|
end
|
|
754
819
|
else
|
|
755
|
-
return prepareJobForProcessing(prefix, KEYS[6], eventStreamKey, jobId,
|
|
756
|
-
|
|
757
|
-
opts)
|
|
820
|
+
return prepareJobForProcessing(prefix, KEYS[6], eventStreamKey, jobId, timestamp, maxJobs, markerKey,
|
|
821
|
+
opts)
|
|
758
822
|
end
|
|
759
823
|
else
|
|
760
|
-
jobId =
|
|
824
|
+
jobId = moveJobFromPrioritizedToActive(KEYS[3], KEYS[2], KEYS[10])
|
|
761
825
|
if jobId then
|
|
762
|
-
return prepareJobForProcessing(prefix, KEYS[6], eventStreamKey, jobId,
|
|
763
|
-
|
|
764
|
-
opts)
|
|
826
|
+
return prepareJobForProcessing(prefix, KEYS[6], eventStreamKey, jobId, timestamp, maxJobs, markerKey,
|
|
827
|
+
opts)
|
|
765
828
|
end
|
|
766
829
|
end
|
|
767
830
|
-- Return the timestamp for the next delayed job if any.
|