@tachybase/plugin-print-template 0.23.8
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/.turbo/turbo-build.log +14 -0
- package/README.md +1 -0
- package/client.d.ts +2 -0
- package/client.js +1 -0
- package/dist/client/index.d.ts +7 -0
- package/dist/client/index.js +1 -0
- package/dist/externalVersion.js +7 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +39 -0
- package/dist/node_modules/bullmq/LICENSE +21 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/async-fifo-queue.js +129 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/backoffs.js +48 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/child-pool.js +71 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/child-processor.js +154 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/child.js +210 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/errors/delayed-error.js +20 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/errors/index.js +8 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/errors/rate-limit-error.js +19 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/errors/unrecoverable-error.js +20 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/errors/waiting-children-error.js +20 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/flow-producer.js +339 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/index.js +25 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/job-scheduler.js +221 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/job.js +893 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/main-base.js +44 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/main-worker.d.ts +1 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/main-worker.js +10 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/main.d.ts +1 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/main.js +10 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/queue-base.js +155 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/queue-events-producer.js +42 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/queue-events.js +125 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/queue-getters.js +450 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/queue-keys.js +43 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/queue.js +635 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/redis-connection.js +270 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/repeat.js +204 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/sandbox.js +75 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/scripts.js +1035 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/worker.js +819 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/addDelayedJob-6.lua +119 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/addJobScheduler-2.lua +91 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/addLog-2.lua +30 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/addParentJob-4.lua +104 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/addPrioritizedJob-8.lua +117 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/addRepeatableJob-2.lua +84 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/addStandardJob-8.lua +122 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/changeDelay-4.lua +55 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/changePriority-7.lua +68 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/cleanJobsInSet-3.lua +55 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/drain-5.lua +41 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/extendLock-2.lua +23 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/extendLocks-1.lua +44 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/getCounts-1.lua +36 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/getCountsPerPriority-4.lua +35 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/getJobScheduler-1.lua +19 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/getRanges-1.lua +70 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/getRateLimitTtl-1.lua +20 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/getState-8.lua +65 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/getStateV2-8.lua +58 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/addBaseMarkerIfNeeded.lua +9 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/addDelayMarkerIfNeeded.lua +15 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/addJobInTargetList.lua +11 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/addJobWithPriority.lua +14 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/batches.lua +18 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/checkItemInList.lua +12 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/cleanList.lua +47 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/cleanSet.lua +66 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/collectMetrics.lua +46 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/deduplicateJob.lua +24 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/destructureJobKey.lua +12 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/findPage.lua +70 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/getDelayedScore.lua +25 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/getJobsInZset.lua +13 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/getNextDelayedTimestamp.lua +12 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/getOrSetMaxEvents.lua +11 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/getRateLimitTTL.lua +17 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/getTargetQueueList.lua +22 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/getTimestamp.lua +19 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/getZSetItems.lua +7 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/handleDuplicatedJob.lua +26 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/isLocked.lua +33 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/isQueueMaxed.lua +15 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/isQueuePaused.lua +7 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/isQueuePausedOrMaxed.lua +18 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/moveJobFromPriorityToActive.lua +13 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/moveParentFromWaitingChildrenToFailed.lua +53 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/moveParentToWaitIfNeeded.lua +55 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/prepareJobForProcessing.lua +50 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/promoteDelayedJobs.lua +40 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/pushBackJobWithPriority.lua +9 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeDeduplicationKey.lua +11 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeDeduplicationKeyIfNeeded.lua +14 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeJob.lua +17 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeJobFromAnyState.lua +35 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeJobKeys.lua +8 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeJobs.lua +13 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeJobsByMaxAge.lua +16 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeJobsByMaxCount.lua +15 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeJobsOnFail.lua +36 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeListJobs.lua +17 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeLock.lua +19 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeParentDependencyKey.lua +90 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeZSetJobs.lua +27 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/storeJob.lua +36 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/trimEvents.lua +15 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/updateExistingJobsParent.lua +27 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/updateJobFields.lua +11 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/updateParentDepsIfNeeded.lua +13 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/isFinished-3.lua +48 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/isJobInList-1.lua +16 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/isMaxed-2.lua +17 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/moveJobFromActiveToWait-10.lua +60 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/moveJobsToWait-8.lua +73 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/moveStalledJobsToWait-9.lua +156 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/moveToActive-11.lua +93 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/moveToDelayed-8.lua +77 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/moveToFinished-14.lua +283 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/moveToWaitingChildren-5.lua +68 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/obliterate-2.lua +118 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/paginate-1.lua +49 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/pause-7.lua +42 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/promote-9.lua +62 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/releaseLock-1.lua +19 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/removeChildDependency-1.lua +34 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/removeJob-2.lua +92 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/removeJobScheduler-3.lua +43 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/removeRepeatable-3.lua +58 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/reprocessJob-8.lua +49 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/retryJob-11.lua +82 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/saveStacktrace-1.lua +19 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/updateData-1.lua +20 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/updateProgress-3.lua +33 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/updateRepeatableJobMillis-1.lua +28 -0
- package/dist/node_modules/bullmq/dist/cjs/enums/child-command.js +10 -0
- package/dist/node_modules/bullmq/dist/cjs/enums/error-code.js +15 -0
- package/dist/node_modules/bullmq/dist/cjs/enums/index.js +9 -0
- package/dist/node_modules/bullmq/dist/cjs/enums/metrics-time.js +15 -0
- package/dist/node_modules/bullmq/dist/cjs/enums/parent-command.js +16 -0
- package/dist/node_modules/bullmq/dist/cjs/enums/telemetry-attributes.js +48 -0
- package/dist/node_modules/bullmq/dist/cjs/index.js +1 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/advanced-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/backoff-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/base-job-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/child-message.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/connection.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/debounce-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/flow-job.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/index.js +32 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/ioredis-events.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/job-json.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/job-scheduler-json.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/keep-jobs.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/metrics-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/metrics.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/minimal-job.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/parent-message.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/parent.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/queue-options.js +9 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/rate-limiter-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/redis-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/redis-streams.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/repeat-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/repeatable-job.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/repeatable-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/sandboxed-job-processor.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/sandboxed-job.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/sandboxed-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/telemetry.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/worker-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/addDelayedJob-6.js +373 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/addJobScheduler-2.js +237 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/addLog-2.js +33 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/addParentJob-4.js +340 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/addPrioritizedJob-8.js +350 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/addRepeatableJob-2.js +230 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/addStandardJob-8.js +354 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/changeDelay-4.js +107 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/changePriority-7.js +122 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/cleanJobsInSet-3.js +350 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/drain-5.js +258 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/extendLock-2.js +30 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/extendLocks-1.js +46 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/getCounts-1.js +42 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/getCountsPerPriority-4.js +46 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/getJobScheduler-1.js +23 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/getRanges-1.js +73 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/getRateLimitTtl-1.js +39 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/getState-8.js +73 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/getStateV2-8.js +57 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/index.js +49 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/isFinished-3.js +49 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/isJobInList-1.js +32 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/isMaxed-2.js +34 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveJobFromActiveToWait-10.js +110 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveJobsToWait-8.js +118 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveStalledJobsToWait-9.js +529 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveToActive-11.js +233 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveToDelayed-8.js +156 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveToFinished-14.js +798 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveToWaitingChildren-5.js +83 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/obliterate-2.js +327 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/paginate-1.js +110 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/pause-7.js +67 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/promote-9.js +105 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/releaseLock-1.js +25 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/removeChildDependency-1.js +165 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/removeJob-2.js +292 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/removeJobScheduler-3.js +49 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/removeRepeatable-3.js +63 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/reprocessJob-8.js +96 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/retryJob-11.js +193 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/saveStacktrace-1.js +27 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/updateData-1.js +26 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/updateProgress-3.js +46 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/updateRepeatableJobMillis-1.js +33 -0
- package/dist/node_modules/bullmq/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -0
- package/dist/node_modules/bullmq/dist/cjs/types/backoff-strategy.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/types/finished-status.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/types/index.js +12 -0
- package/dist/node_modules/bullmq/dist/cjs/types/job-json-sandbox.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/types/job-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/types/job-scheduler-template-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/types/job-type.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/types/minimal-queue.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/types/repeat-strategy.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/utils.js +288 -0
- package/dist/node_modules/bullmq/dist/cjs/version.js +5 -0
- package/dist/node_modules/bullmq/dist/esm/classes/async-fifo-queue.d.ts +37 -0
- package/dist/node_modules/bullmq/dist/esm/classes/async-fifo-queue.js +125 -0
- package/dist/node_modules/bullmq/dist/esm/classes/backoffs.d.ts +10 -0
- package/dist/node_modules/bullmq/dist/esm/classes/backoffs.js +44 -0
- package/dist/node_modules/bullmq/dist/esm/classes/child-pool.d.ts +23 -0
- package/dist/node_modules/bullmq/dist/esm/classes/child-pool.js +67 -0
- package/dist/node_modules/bullmq/dist/esm/classes/child-processor.d.ts +37 -0
- package/dist/node_modules/bullmq/dist/esm/classes/child-processor.js +150 -0
- package/dist/node_modules/bullmq/dist/esm/classes/child.d.ts +35 -0
- package/dist/node_modules/bullmq/dist/esm/classes/child.js +206 -0
- package/dist/node_modules/bullmq/dist/esm/classes/errors/delayed-error.d.ts +11 -0
- package/dist/node_modules/bullmq/dist/esm/classes/errors/delayed-error.js +16 -0
- package/dist/node_modules/bullmq/dist/esm/classes/errors/index.d.ts +4 -0
- package/dist/node_modules/bullmq/dist/esm/classes/errors/index.js +5 -0
- package/dist/node_modules/bullmq/dist/esm/classes/errors/rate-limit-error.d.ts +10 -0
- package/dist/node_modules/bullmq/dist/esm/classes/errors/rate-limit-error.js +15 -0
- package/dist/node_modules/bullmq/dist/esm/classes/errors/unrecoverable-error.d.ts +11 -0
- package/dist/node_modules/bullmq/dist/esm/classes/errors/unrecoverable-error.js +16 -0
- package/dist/node_modules/bullmq/dist/esm/classes/errors/waiting-children-error.d.ts +11 -0
- package/dist/node_modules/bullmq/dist/esm/classes/errors/waiting-children-error.js +16 -0
- package/dist/node_modules/bullmq/dist/esm/classes/flow-producer.d.ts +179 -0
- package/dist/node_modules/bullmq/dist/esm/classes/flow-producer.js +335 -0
- package/dist/node_modules/bullmq/dist/esm/classes/index.d.ts +19 -0
- package/dist/node_modules/bullmq/dist/esm/classes/index.js +22 -0
- package/dist/node_modules/bullmq/dist/esm/classes/job-scheduler.d.ts +24 -0
- package/dist/node_modules/bullmq/dist/esm/classes/job-scheduler.js +216 -0
- package/dist/node_modules/bullmq/dist/esm/classes/job.d.ts +425 -0
- package/dist/node_modules/bullmq/dist/esm/classes/job.js +889 -0
- package/dist/node_modules/bullmq/dist/esm/classes/main-base.d.ts +4 -0
- package/dist/node_modules/bullmq/dist/esm/classes/main-base.js +42 -0
- package/dist/node_modules/bullmq/dist/esm/classes/main-worker.d.ts +1 -0
- package/dist/node_modules/bullmq/dist/esm/classes/main-worker.js +8 -0
- package/dist/node_modules/bullmq/dist/esm/classes/main.d.ts +1 -0
- package/dist/node_modules/bullmq/dist/esm/classes/main.js +8 -0
- package/dist/node_modules/bullmq/dist/esm/classes/queue-base.d.ts +83 -0
- package/dist/node_modules/bullmq/dist/esm/classes/queue-base.js +151 -0
- package/dist/node_modules/bullmq/dist/esm/classes/queue-events-producer.d.ts +21 -0
- package/dist/node_modules/bullmq/dist/esm/classes/queue-events-producer.js +38 -0
- package/dist/node_modules/bullmq/dist/esm/classes/queue-events.d.ts +201 -0
- package/dist/node_modules/bullmq/dist/esm/classes/queue-events.js +121 -0
- package/dist/node_modules/bullmq/dist/esm/classes/queue-getters.d.ts +235 -0
- package/dist/node_modules/bullmq/dist/esm/classes/queue-getters.js +447 -0
- package/dist/node_modules/bullmq/dist/esm/classes/queue-keys.d.ts +10 -0
- package/dist/node_modules/bullmq/dist/esm/classes/queue-keys.js +39 -0
- package/dist/node_modules/bullmq/dist/esm/classes/queue.d.ts +406 -0
- package/dist/node_modules/bullmq/dist/esm/classes/queue.js +631 -0
- package/dist/node_modules/bullmq/dist/esm/classes/redis-connection.d.ts +46 -0
- package/dist/node_modules/bullmq/dist/esm/classes/redis-connection.js +266 -0
- package/dist/node_modules/bullmq/dist/esm/classes/repeat.d.ts +25 -0
- package/dist/node_modules/bullmq/dist/esm/classes/repeat.js +199 -0
- package/dist/node_modules/bullmq/dist/esm/classes/sandbox.d.ts +4 -0
- package/dist/node_modules/bullmq/dist/esm/classes/sandbox.js +73 -0
- package/dist/node_modules/bullmq/dist/esm/classes/scripts.d.ts +160 -0
- package/dist/node_modules/bullmq/dist/esm/classes/scripts.js +1031 -0
- package/dist/node_modules/bullmq/dist/esm/classes/worker.d.ts +231 -0
- package/dist/node_modules/bullmq/dist/esm/classes/worker.js +815 -0
- package/dist/node_modules/bullmq/dist/esm/commands/addDelayedJob-6.lua +119 -0
- package/dist/node_modules/bullmq/dist/esm/commands/addJobScheduler-2.lua +91 -0
- package/dist/node_modules/bullmq/dist/esm/commands/addLog-2.lua +30 -0
- package/dist/node_modules/bullmq/dist/esm/commands/addParentJob-4.lua +104 -0
- package/dist/node_modules/bullmq/dist/esm/commands/addPrioritizedJob-8.lua +117 -0
- package/dist/node_modules/bullmq/dist/esm/commands/addRepeatableJob-2.lua +84 -0
- package/dist/node_modules/bullmq/dist/esm/commands/addStandardJob-8.lua +122 -0
- package/dist/node_modules/bullmq/dist/esm/commands/changeDelay-4.lua +55 -0
- package/dist/node_modules/bullmq/dist/esm/commands/changePriority-7.lua +68 -0
- package/dist/node_modules/bullmq/dist/esm/commands/cleanJobsInSet-3.lua +55 -0
- package/dist/node_modules/bullmq/dist/esm/commands/drain-5.lua +41 -0
- package/dist/node_modules/bullmq/dist/esm/commands/extendLock-2.lua +23 -0
- package/dist/node_modules/bullmq/dist/esm/commands/extendLocks-1.lua +44 -0
- package/dist/node_modules/bullmq/dist/esm/commands/getCounts-1.lua +36 -0
- package/dist/node_modules/bullmq/dist/esm/commands/getCountsPerPriority-4.lua +35 -0
- package/dist/node_modules/bullmq/dist/esm/commands/getJobScheduler-1.lua +19 -0
- package/dist/node_modules/bullmq/dist/esm/commands/getRanges-1.lua +70 -0
- package/dist/node_modules/bullmq/dist/esm/commands/getRateLimitTtl-1.lua +20 -0
- package/dist/node_modules/bullmq/dist/esm/commands/getState-8.lua +65 -0
- package/dist/node_modules/bullmq/dist/esm/commands/getStateV2-8.lua +58 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/addBaseMarkerIfNeeded.lua +9 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/addDelayMarkerIfNeeded.lua +15 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/addJobInTargetList.lua +11 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/addJobWithPriority.lua +14 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/batches.lua +18 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/checkItemInList.lua +12 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/cleanList.lua +47 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/cleanSet.lua +66 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/collectMetrics.lua +46 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/deduplicateJob.lua +24 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/destructureJobKey.lua +12 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/findPage.lua +70 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/getDelayedScore.lua +25 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/getJobsInZset.lua +13 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/getNextDelayedTimestamp.lua +12 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/getOrSetMaxEvents.lua +11 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/getRateLimitTTL.lua +17 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/getTargetQueueList.lua +22 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/getTimestamp.lua +19 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/getZSetItems.lua +7 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/handleDuplicatedJob.lua +26 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/isLocked.lua +33 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/isQueueMaxed.lua +15 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/isQueuePaused.lua +7 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/isQueuePausedOrMaxed.lua +18 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/moveJobFromPriorityToActive.lua +13 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/moveParentFromWaitingChildrenToFailed.lua +53 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/moveParentToWaitIfNeeded.lua +55 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/prepareJobForProcessing.lua +50 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/promoteDelayedJobs.lua +40 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/pushBackJobWithPriority.lua +9 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeDeduplicationKey.lua +11 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeDeduplicationKeyIfNeeded.lua +14 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeJob.lua +17 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeJobFromAnyState.lua +35 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeJobKeys.lua +8 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeJobs.lua +13 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeJobsByMaxAge.lua +16 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeJobsByMaxCount.lua +15 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeJobsOnFail.lua +36 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeListJobs.lua +17 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeLock.lua +19 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeParentDependencyKey.lua +90 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeZSetJobs.lua +27 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/storeJob.lua +36 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/trimEvents.lua +15 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/updateExistingJobsParent.lua +27 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/updateJobFields.lua +11 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/updateParentDepsIfNeeded.lua +13 -0
- package/dist/node_modules/bullmq/dist/esm/commands/isFinished-3.lua +48 -0
- package/dist/node_modules/bullmq/dist/esm/commands/isJobInList-1.lua +16 -0
- package/dist/node_modules/bullmq/dist/esm/commands/isMaxed-2.lua +17 -0
- package/dist/node_modules/bullmq/dist/esm/commands/moveJobFromActiveToWait-10.lua +60 -0
- package/dist/node_modules/bullmq/dist/esm/commands/moveJobsToWait-8.lua +73 -0
- package/dist/node_modules/bullmq/dist/esm/commands/moveStalledJobsToWait-9.lua +156 -0
- package/dist/node_modules/bullmq/dist/esm/commands/moveToActive-11.lua +93 -0
- package/dist/node_modules/bullmq/dist/esm/commands/moveToDelayed-8.lua +77 -0
- package/dist/node_modules/bullmq/dist/esm/commands/moveToFinished-14.lua +283 -0
- package/dist/node_modules/bullmq/dist/esm/commands/moveToWaitingChildren-5.lua +68 -0
- package/dist/node_modules/bullmq/dist/esm/commands/obliterate-2.lua +118 -0
- package/dist/node_modules/bullmq/dist/esm/commands/paginate-1.lua +49 -0
- package/dist/node_modules/bullmq/dist/esm/commands/pause-7.lua +42 -0
- package/dist/node_modules/bullmq/dist/esm/commands/promote-9.lua +62 -0
- package/dist/node_modules/bullmq/dist/esm/commands/releaseLock-1.lua +19 -0
- package/dist/node_modules/bullmq/dist/esm/commands/removeChildDependency-1.lua +34 -0
- package/dist/node_modules/bullmq/dist/esm/commands/removeJob-2.lua +92 -0
- package/dist/node_modules/bullmq/dist/esm/commands/removeJobScheduler-3.lua +43 -0
- package/dist/node_modules/bullmq/dist/esm/commands/removeRepeatable-3.lua +58 -0
- package/dist/node_modules/bullmq/dist/esm/commands/reprocessJob-8.lua +49 -0
- package/dist/node_modules/bullmq/dist/esm/commands/retryJob-11.lua +82 -0
- package/dist/node_modules/bullmq/dist/esm/commands/saveStacktrace-1.lua +19 -0
- package/dist/node_modules/bullmq/dist/esm/commands/updateData-1.lua +20 -0
- package/dist/node_modules/bullmq/dist/esm/commands/updateProgress-3.lua +33 -0
- package/dist/node_modules/bullmq/dist/esm/commands/updateRepeatableJobMillis-1.lua +28 -0
- package/dist/node_modules/bullmq/dist/esm/enums/child-command.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/enums/child-command.js +7 -0
- package/dist/node_modules/bullmq/dist/esm/enums/error-code.d.ts +10 -0
- package/dist/node_modules/bullmq/dist/esm/enums/error-code.js +12 -0
- package/dist/node_modules/bullmq/dist/esm/enums/index.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/enums/index.js +6 -0
- package/dist/node_modules/bullmq/dist/esm/enums/metrics-time.d.ts +10 -0
- package/dist/node_modules/bullmq/dist/esm/enums/metrics-time.js +12 -0
- package/dist/node_modules/bullmq/dist/esm/enums/parent-command.d.ts +11 -0
- package/dist/node_modules/bullmq/dist/esm/enums/parent-command.js +13 -0
- package/dist/node_modules/bullmq/dist/esm/enums/telemetry-attributes.d.ts +42 -0
- package/dist/node_modules/bullmq/dist/esm/enums/telemetry-attributes.js +45 -0
- package/dist/node_modules/bullmq/dist/esm/index.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/index.js +6 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/advanced-options.d.ts +18 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/advanced-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/backoff-options.d.ts +15 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/backoff-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/base-job-options.d.ts +100 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/base-job-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/child-message.d.ts +6 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/child-message.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/connection.d.ts +8 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/connection.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/debounce-options.d.ts +13 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/debounce-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/flow-job.d.ts +19 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/flow-job.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/index.d.ts +28 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/index.js +29 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/ioredis-events.d.ts +8 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/ioredis-events.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/job-json.d.ts +47 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/job-json.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/job-scheduler-json.d.ts +16 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/job-scheduler-json.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/keep-jobs.d.ts +17 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/keep-jobs.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/metrics-options.d.ts +12 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/metrics-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/metrics.d.ts +9 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/metrics.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/minimal-job.d.ts +133 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/minimal-job.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/parent-message.d.ts +8 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/parent-message.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/parent.d.ts +20 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/parent.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/queue-options.d.ts +97 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/queue-options.js +6 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/rate-limiter-options.d.ts +12 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/rate-limiter-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/redis-options.d.ts +8 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/redis-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/redis-streams.d.ts +4 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/redis-streams.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/repeat-options.d.ts +51 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/repeat-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/repeatable-job.d.ts +10 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/repeatable-job.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/repeatable-options.d.ts +7 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/repeatable-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/sandboxed-job-processor.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/sandboxed-job-processor.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/sandboxed-job.d.ts +13 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/sandboxed-job.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/sandboxed-options.d.ts +28 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/sandboxed-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/telemetry.d.ts +150 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/telemetry.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/worker-options.d.ts +133 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/worker-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addDelayedJob-6.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addDelayedJob-6.js +370 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addJobScheduler-2.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addJobScheduler-2.js +234 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addLog-2.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addLog-2.js +30 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addParentJob-4.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addParentJob-4.js +337 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addPrioritizedJob-8.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addPrioritizedJob-8.js +347 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addRepeatableJob-2.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addRepeatableJob-2.js +227 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addStandardJob-8.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addStandardJob-8.js +351 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/changeDelay-4.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/changeDelay-4.js +104 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/changePriority-7.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/changePriority-7.js +119 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/cleanJobsInSet-3.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/cleanJobsInSet-3.js +347 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/drain-5.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/drain-5.js +255 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/extendLock-2.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/extendLock-2.js +27 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/extendLocks-1.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/extendLocks-1.js +43 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getCounts-1.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getCounts-1.js +39 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getCountsPerPriority-4.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getCountsPerPriority-4.js +43 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getJobScheduler-1.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getJobScheduler-1.js +20 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getRanges-1.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getRanges-1.js +70 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getRateLimitTtl-1.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getRateLimitTtl-1.js +36 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getState-8.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getState-8.js +70 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getStateV2-8.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getStateV2-8.js +54 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/index.d.ts +45 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/index.js +46 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/isFinished-3.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/isFinished-3.js +46 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/isJobInList-1.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/isJobInList-1.js +29 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/isMaxed-2.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/isMaxed-2.js +31 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveJobFromActiveToWait-10.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveJobFromActiveToWait-10.js +107 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveJobsToWait-8.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveJobsToWait-8.js +115 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveStalledJobsToWait-9.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveStalledJobsToWait-9.js +526 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveToActive-11.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveToActive-11.js +230 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveToDelayed-8.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveToDelayed-8.js +153 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveToFinished-14.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveToFinished-14.js +795 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveToWaitingChildren-5.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveToWaitingChildren-5.js +80 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/obliterate-2.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/obliterate-2.js +324 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/paginate-1.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/paginate-1.js +107 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/pause-7.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/pause-7.js +64 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/promote-9.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/promote-9.js +102 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/releaseLock-1.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/releaseLock-1.js +22 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/removeChildDependency-1.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/removeChildDependency-1.js +162 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/removeJob-2.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/removeJob-2.js +289 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/removeJobScheduler-3.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/removeJobScheduler-3.js +46 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/removeRepeatable-3.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/removeRepeatable-3.js +60 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/reprocessJob-8.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/reprocessJob-8.js +93 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/retryJob-11.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/retryJob-11.js +190 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/saveStacktrace-1.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/saveStacktrace-1.js +24 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/updateData-1.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/updateData-1.js +23 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/updateProgress-3.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/updateProgress-3.js +43 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/updateRepeatableJobMillis-1.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/updateRepeatableJobMillis-1.js +30 -0
- package/dist/node_modules/bullmq/dist/esm/tsconfig.tsbuildinfo +1 -0
- package/dist/node_modules/bullmq/dist/esm/types/backoff-strategy.d.ts +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/backoff-strategy.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/finished-status.d.ts +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/finished-status.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/index.d.ts +8 -0
- package/dist/node_modules/bullmq/dist/esm/types/index.js +9 -0
- package/dist/node_modules/bullmq/dist/esm/types/job-json-sandbox.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/types/job-json-sandbox.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/job-options.d.ts +81 -0
- package/dist/node_modules/bullmq/dist/esm/types/job-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/job-scheduler-template-options.d.ts +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/job-scheduler-template-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/job-type.d.ts +3 -0
- package/dist/node_modules/bullmq/dist/esm/types/job-type.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/minimal-queue.d.ts +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/minimal-queue.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/repeat-strategy.d.ts +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/repeat-strategy.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/utils.d.ts +72 -0
- package/dist/node_modules/bullmq/dist/esm/utils.js +263 -0
- package/dist/node_modules/bullmq/dist/esm/version.d.ts +1 -0
- package/dist/node_modules/bullmq/dist/esm/version.js +2 -0
- package/dist/node_modules/bullmq/node_modules/.bin/semver +17 -0
- package/dist/node_modules/bullmq/node_modules/.bin/uuid +17 -0
- package/dist/node_modules/bullmq/package.json +1 -0
- package/dist/node_modules/docxtemplater/build/docxtemplater.js +5019 -0
- package/dist/node_modules/docxtemplater/build/docxtemplater.min.js +1 -0
- package/dist/node_modules/docxtemplater/docxtemplater.d.ts +140 -0
- package/dist/node_modules/docxtemplater/docxtemplater.test-d.ts +318 -0
- package/dist/node_modules/docxtemplater/expressions-ie11.d.ts +19 -0
- package/dist/node_modules/docxtemplater/expressions-ie11.js +170 -0
- package/dist/node_modules/docxtemplater/expressions.d.ts +25 -0
- package/dist/node_modules/docxtemplater/expressions.js +322 -0
- package/dist/node_modules/docxtemplater/inspect-module.d.ts +29 -0
- package/dist/node_modules/docxtemplater/js/browser-versions/fs.js +3 -0
- package/dist/node_modules/docxtemplater/js/browser-versions/xmldom.js +7 -0
- package/dist/node_modules/docxtemplater/js/collect-content-types.js +28 -0
- package/dist/node_modules/docxtemplater/js/content-types.js +16 -0
- package/dist/node_modules/docxtemplater/js/debugger-module.js +60 -0
- package/dist/node_modules/docxtemplater/js/doc-utils.js +450 -0
- package/dist/node_modules/docxtemplater/js/docxtemplater.d.ts +140 -0
- package/dist/node_modules/docxtemplater/js/docxtemplater.js +1 -0
- package/dist/node_modules/docxtemplater/js/docxtemplater.test-d.ts +318 -0
- package/dist/node_modules/docxtemplater/js/error-logger.js +34 -0
- package/dist/node_modules/docxtemplater/js/errors.js +406 -0
- package/dist/node_modules/docxtemplater/js/expressions-ie11.d.ts +19 -0
- package/dist/node_modules/docxtemplater/js/expressions-ie11.js +165 -0
- package/dist/node_modules/docxtemplater/js/expressions.d.ts +25 -0
- package/dist/node_modules/docxtemplater/js/expressions.js +283 -0
- package/dist/node_modules/docxtemplater/js/file-type-config.js +89 -0
- package/dist/node_modules/docxtemplater/js/filetypes.js +24 -0
- package/dist/node_modules/docxtemplater/js/get-resolved-id.js +14 -0
- package/dist/node_modules/docxtemplater/js/inspect-module.d.ts +29 -0
- package/dist/node_modules/docxtemplater/js/inspect-module.js +253 -0
- package/dist/node_modules/docxtemplater/js/join-uncorrupt.js +109 -0
- package/dist/node_modules/docxtemplater/js/lexer.js +470 -0
- package/dist/node_modules/docxtemplater/js/memory-test.js +38 -0
- package/dist/node_modules/docxtemplater/js/merge-sort.js +32 -0
- package/dist/node_modules/docxtemplater/js/module-wrapper.js +44 -0
- package/dist/node_modules/docxtemplater/js/modules/common.js +69 -0
- package/dist/node_modules/docxtemplater/js/modules/expand-pair-trait.js +257 -0
- package/dist/node_modules/docxtemplater/js/modules/fix-doc-pr-corruption.js +85 -0
- package/dist/node_modules/docxtemplater/js/modules/loop.js +470 -0
- package/dist/node_modules/docxtemplater/js/modules/rawxml.js +109 -0
- package/dist/node_modules/docxtemplater/js/modules/render.js +176 -0
- package/dist/node_modules/docxtemplater/js/modules/space-preserve.js +107 -0
- package/dist/node_modules/docxtemplater/js/parser.js +203 -0
- package/dist/node_modules/docxtemplater/js/postrender.js +110 -0
- package/dist/node_modules/docxtemplater/js/prefix-matcher.js +48 -0
- package/dist/node_modules/docxtemplater/js/proof-state-module.js +27 -0
- package/dist/node_modules/docxtemplater/js/render.js +64 -0
- package/dist/node_modules/docxtemplater/js/resolve.js +82 -0
- package/dist/node_modules/docxtemplater/js/scope-manager.js +229 -0
- package/dist/node_modules/docxtemplater/js/test-text.js +12 -0
- package/dist/node_modules/docxtemplater/js/tests/assertion-module.js +163 -0
- package/dist/node_modules/docxtemplater/js/tests/data/raw-xml-pptx.js +3 -0
- package/dist/node_modules/docxtemplater/js/tests/e2e/async.js +167 -0
- package/dist/node_modules/docxtemplater/js/tests/e2e/base.js +1133 -0
- package/dist/node_modules/docxtemplater/js/tests/e2e/doc-props.js +68 -0
- package/dist/node_modules/docxtemplater/js/tests/e2e/errors.js +1216 -0
- package/dist/node_modules/docxtemplater/js/tests/e2e/fixtures.js +2031 -0
- package/dist/node_modules/docxtemplater/js/tests/e2e/integration.js +1258 -0
- package/dist/node_modules/docxtemplater/js/tests/e2e/lexer-parser-render.js +139 -0
- package/dist/node_modules/docxtemplater/js/tests/e2e/modules.js +796 -0
- package/dist/node_modules/docxtemplater/js/tests/e2e/pptx.js +140 -0
- package/dist/node_modules/docxtemplater/js/tests/e2e/speed.js +281 -0
- package/dist/node_modules/docxtemplater/js/tests/e2e/table.js +215 -0
- package/dist/node_modules/docxtemplater/js/tests/e2e/text.js +98 -0
- package/dist/node_modules/docxtemplater/js/tests/e2e/v3.js +279 -0
- package/dist/node_modules/docxtemplater/js/tests/e2e/xml-templater.js +478 -0
- package/dist/node_modules/docxtemplater/js/tests/filenames.js +1 -0
- package/dist/node_modules/docxtemplater/js/tests/index.js +122 -0
- package/dist/node_modules/docxtemplater/js/tests/printy.js +47 -0
- package/dist/node_modules/docxtemplater/js/tests/string-repeat.js +36 -0
- package/dist/node_modules/docxtemplater/js/tests/unit/doc-utils.js +77 -0
- package/dist/node_modules/docxtemplater/js/tests/unit/expressions.js +124 -0
- package/dist/node_modules/docxtemplater/js/tests/unit/merge-sort.js +69 -0
- package/dist/node_modules/docxtemplater/js/tests/unit/scope-manager.js +76 -0
- package/dist/node_modules/docxtemplater/js/tests/unit/xml-matcher.js +72 -0
- package/dist/node_modules/docxtemplater/js/tests/utils.js +873 -0
- package/dist/node_modules/docxtemplater/js/tests/xml-prettify.js +219 -0
- package/dist/node_modules/docxtemplater/js/text.d.ts +16 -0
- package/dist/node_modules/docxtemplater/js/text.js +88 -0
- package/dist/node_modules/docxtemplater/js/traits.js +347 -0
- package/dist/node_modules/docxtemplater/js/uintarray-to-string.js +132 -0
- package/dist/node_modules/docxtemplater/js/utils.js +12 -0
- package/dist/node_modules/docxtemplater/js/xml-matcher.js +13 -0
- package/dist/node_modules/docxtemplater/js/xml-templater.js +242 -0
- package/dist/node_modules/docxtemplater/package.json +1 -0
- package/dist/node_modules/docxtemplater/text.d.ts +16 -0
- package/dist/node_modules/docxtemplater/text.js +88 -0
- package/dist/node_modules/docxtemplater/webpack.config.js +55 -0
- package/dist/node_modules/pizzip/.babelrc +5 -0
- package/dist/node_modules/pizzip/.codeclimate.yml +14 -0
- package/dist/node_modules/pizzip/.editorconfig +13 -0
- package/dist/node_modules/pizzip/.eslintcache +1 -0
- package/dist/node_modules/pizzip/.eslintrc +203 -0
- package/dist/node_modules/pizzip/.ignored.log +8 -0
- package/dist/node_modules/pizzip/.jshintignore +2 -0
- package/dist/node_modules/pizzip/.jshintrc +12 -0
- package/dist/node_modules/pizzip/.prettierrc.yaml +1 -0
- package/dist/node_modules/pizzip/.travis.yml +19 -0
- package/dist/node_modules/pizzip/LICENSE.markdown +647 -0
- package/dist/node_modules/pizzip/README.markdown +30 -0
- package/dist/node_modules/pizzip/dist/pizzip-utils-ie.js +50 -0
- package/dist/node_modules/pizzip/dist/pizzip-utils-ie.min.js +1 -0
- package/dist/node_modules/pizzip/dist/pizzip-utils.js +58 -0
- package/dist/node_modules/pizzip/dist/pizzip-utils.min.js +1 -0
- package/dist/node_modules/pizzip/dist/pizzip.js +321 -0
- package/dist/node_modules/pizzip/dist/pizzip.min.js +2 -0
- package/dist/node_modules/pizzip/dist/pizzip.min.js.LICENSE.txt +1 -0
- package/dist/node_modules/pizzip/es6/arrayReader.js +59 -0
- package/dist/node_modules/pizzip/es6/base64.js +69 -0
- package/dist/node_modules/pizzip/es6/compressedObject.js +28 -0
- package/dist/node_modules/pizzip/es6/compressions.js +13 -0
- package/dist/node_modules/pizzip/es6/crc32.js +102 -0
- package/dist/node_modules/pizzip/es6/dataReader.js +115 -0
- package/dist/node_modules/pizzip/es6/defaults.js +11 -0
- package/dist/node_modules/pizzip/es6/deprecatedPublicUtils.js +103 -0
- package/dist/node_modules/pizzip/es6/flate.js +19 -0
- package/dist/node_modules/pizzip/es6/index.d.ts +384 -0
- package/dist/node_modules/pizzip/es6/index.js +89 -0
- package/dist/node_modules/pizzip/es6/index.test-d.ts +99 -0
- package/dist/node_modules/pizzip/es6/license_header.js +11 -0
- package/dist/node_modules/pizzip/es6/load.js +39 -0
- package/dist/node_modules/pizzip/es6/nodeBuffer.js +10 -0
- package/dist/node_modules/pizzip/es6/nodeBufferReader.js +24 -0
- package/dist/node_modules/pizzip/es6/object.js +924 -0
- package/dist/node_modules/pizzip/es6/signature.js +7 -0
- package/dist/node_modules/pizzip/es6/stringReader.js +40 -0
- package/dist/node_modules/pizzip/es6/stringWriter.js +30 -0
- package/dist/node_modules/pizzip/es6/support.js +37 -0
- package/dist/node_modules/pizzip/es6/uint8ArrayReader.js +29 -0
- package/dist/node_modules/pizzip/es6/uint8ArrayWriter.js +36 -0
- package/dist/node_modules/pizzip/es6/utf8.js +241 -0
- package/dist/node_modules/pizzip/es6/utils.js +381 -0
- package/dist/node_modules/pizzip/es6/zipEntries.js +317 -0
- package/dist/node_modules/pizzip/es6/zipEntry.js +349 -0
- package/dist/node_modules/pizzip/js/arrayReader.js +49 -0
- package/dist/node_modules/pizzip/js/base64.js +53 -0
- package/dist/node_modules/pizzip/js/compressedObject.js +28 -0
- package/dist/node_modules/pizzip/js/compressions.js +14 -0
- package/dist/node_modules/pizzip/js/crc32.js +33 -0
- package/dist/node_modules/pizzip/js/dataReader.js +112 -0
- package/dist/node_modules/pizzip/js/defaults.js +12 -0
- package/dist/node_modules/pizzip/js/deprecatedPublicUtils.js +104 -0
- package/dist/node_modules/pizzip/js/flate.js +15 -0
- package/dist/node_modules/pizzip/js/index.d.ts +384 -0
- package/dist/node_modules/pizzip/js/index.js +3 -0
- package/dist/node_modules/pizzip/js/index.test-d.ts +99 -0
- package/dist/node_modules/pizzip/js/license_header.js +12 -0
- package/dist/node_modules/pizzip/js/load.js +38 -0
- package/dist/node_modules/pizzip/js/nodeBuffer.js +11 -0
- package/dist/node_modules/pizzip/js/nodeBufferReader.js +21 -0
- package/dist/node_modules/pizzip/js/object.js +803 -0
- package/dist/node_modules/pizzip/js/signature.js +8 -0
- package/dist/node_modules/pizzip/js/stringReader.js +37 -0
- package/dist/node_modules/pizzip/js/stringWriter.js +29 -0
- package/dist/node_modules/pizzip/js/support.js +31 -0
- package/dist/node_modules/pizzip/js/uint8ArrayReader.js +26 -0
- package/dist/node_modules/pizzip/js/uint8ArrayWriter.js +35 -0
- package/dist/node_modules/pizzip/js/utf8.js +221 -0
- package/dist/node_modules/pizzip/js/utils.js +353 -0
- package/dist/node_modules/pizzip/js/zipEntries.js +266 -0
- package/dist/node_modules/pizzip/js/zipEntry.js +293 -0
- package/dist/node_modules/pizzip/package.json +1 -0
- package/dist/node_modules/pizzip/symlink.sh +4 -0
- package/dist/node_modules/pizzip/utils/.jshintignore +2 -0
- package/dist/node_modules/pizzip/utils/.jshintrc +13 -0
- package/dist/node_modules/pizzip/utils/.travis.yml +10 -0
- package/dist/node_modules/pizzip/utils/LICENSE.markdown +651 -0
- package/dist/node_modules/pizzip/utils/README.markdown +21 -0
- package/dist/node_modules/pizzip/utils/dist/pizzip-utils-ie.js +50 -0
- package/dist/node_modules/pizzip/utils/dist/pizzip-utils-ie.min.js +1 -0
- package/dist/node_modules/pizzip/utils/dist/pizzip-utils.js +58 -0
- package/dist/node_modules/pizzip/utils/dist/pizzip-utils.min.js +1 -0
- package/dist/node_modules/pizzip/utils/es6/index.js +105 -0
- package/dist/node_modules/pizzip/utils/es6/index_IE.js +43 -0
- package/dist/node_modules/pizzip/utils/es6/license_header.js +8 -0
- package/dist/node_modules/pizzip/utils/index.d.ts +5 -0
- package/dist/node_modules/pizzip/utils/index.js +1 -0
- package/dist/node_modules/pizzip/utils/index.test-d.ts +15 -0
- package/dist/node_modules/pizzip/utils/webpack.config.js +39 -0
- package/dist/node_modules/pizzip/vendor/FileSaver.js +247 -0
- package/dist/node_modules/pizzip/webpack.config.js +30 -0
- package/dist/server/actions/printTemplates.d.ts +6 -0
- package/dist/server/actions/printTemplates.js +126 -0
- package/dist/server/actions/producer.d.ts +3 -0
- package/dist/server/actions/producer.js +81 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +33 -0
- package/dist/server/plugin.d.ts +8 -0
- package/dist/server/plugin.js +120 -0
- package/package.json +26 -0
- package/server.d.ts +2 -0
- package/server.js +1 -0
|
@@ -0,0 +1,798 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.moveToFinished = void 0;
|
|
4
|
+
const content = `--[[
|
|
5
|
+
Move job from active to a finished status (completed o failed)
|
|
6
|
+
A job can only be moved to completed if it was active.
|
|
7
|
+
The job must be locked before it can be moved to a finished status,
|
|
8
|
+
and the lock must be released in this script.
|
|
9
|
+
Input:
|
|
10
|
+
KEYS[1] wait key
|
|
11
|
+
KEYS[2] active key
|
|
12
|
+
KEYS[3] prioritized key
|
|
13
|
+
KEYS[4] event stream key
|
|
14
|
+
KEYS[5] stalled key
|
|
15
|
+
-- Rate limiting
|
|
16
|
+
KEYS[6] rate limiter key
|
|
17
|
+
KEYS[7] delayed key
|
|
18
|
+
KEYS[8] paused key
|
|
19
|
+
KEYS[9] meta key
|
|
20
|
+
KEYS[10] pc priority counter
|
|
21
|
+
KEYS[11] completed/failed key
|
|
22
|
+
KEYS[12] jobId key
|
|
23
|
+
KEYS[13] metrics key
|
|
24
|
+
KEYS[14] marker key
|
|
25
|
+
ARGV[1] jobId
|
|
26
|
+
ARGV[2] timestamp
|
|
27
|
+
ARGV[3] msg property returnvalue / failedReason
|
|
28
|
+
ARGV[4] return value / failed reason
|
|
29
|
+
ARGV[5] target (completed/failed)
|
|
30
|
+
ARGV[6] fetch next?
|
|
31
|
+
ARGV[7] keys prefix
|
|
32
|
+
ARGV[8] opts
|
|
33
|
+
ARGV[9] job fields to update
|
|
34
|
+
opts - token - lock token
|
|
35
|
+
opts - keepJobs
|
|
36
|
+
opts - lockDuration - lock duration in milliseconds
|
|
37
|
+
opts - attempts max attempts
|
|
38
|
+
opts - maxMetricsSize
|
|
39
|
+
opts - fpof - fail parent on fail
|
|
40
|
+
opts - idof - ignore dependency on fail
|
|
41
|
+
opts - rdof - remove dependency on fail
|
|
42
|
+
Output:
|
|
43
|
+
0 OK
|
|
44
|
+
-1 Missing key.
|
|
45
|
+
-2 Missing lock.
|
|
46
|
+
-3 Job not in active set
|
|
47
|
+
-4 Job has pending dependencies
|
|
48
|
+
-6 Lock is not owned by this client
|
|
49
|
+
Events:
|
|
50
|
+
'completed/failed'
|
|
51
|
+
]]
|
|
52
|
+
local rcall = redis.call
|
|
53
|
+
--- Includes
|
|
54
|
+
--[[
|
|
55
|
+
Functions to collect metrics based on a current and previous count of jobs.
|
|
56
|
+
Granualarity is fixed at 1 minute.
|
|
57
|
+
]]
|
|
58
|
+
--[[
|
|
59
|
+
Function to loop in batches.
|
|
60
|
+
Just a bit of warning, some commands as ZREM
|
|
61
|
+
could receive a maximum of 7000 parameters per call.
|
|
62
|
+
]]
|
|
63
|
+
local function batches(n, batchSize)
|
|
64
|
+
local i = 0
|
|
65
|
+
return function()
|
|
66
|
+
local from = i * batchSize + 1
|
|
67
|
+
i = i + 1
|
|
68
|
+
if (from <= n) then
|
|
69
|
+
local to = math.min(from + batchSize - 1, n)
|
|
70
|
+
return from, to
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
local function collectMetrics(metaKey, dataPointsList, maxDataPoints,
|
|
75
|
+
timestamp)
|
|
76
|
+
-- Increment current count
|
|
77
|
+
local count = rcall("HINCRBY", metaKey, "count", 1) - 1
|
|
78
|
+
-- Compute how many data points we need to add to the list, N.
|
|
79
|
+
local prevTS = rcall("HGET", metaKey, "prevTS")
|
|
80
|
+
if not prevTS then
|
|
81
|
+
-- If prevTS is nil, set it to the current timestamp
|
|
82
|
+
rcall("HSET", metaKey, "prevTS", timestamp, "prevCount", 0)
|
|
83
|
+
return
|
|
84
|
+
end
|
|
85
|
+
local N = math.min(math.floor(timestamp / 60000) - math.floor(prevTS / 60000), tonumber(maxDataPoints))
|
|
86
|
+
if N > 0 then
|
|
87
|
+
local delta = count - rcall("HGET", metaKey, "prevCount")
|
|
88
|
+
-- If N > 1, add N-1 zeros to the list
|
|
89
|
+
if N > 1 then
|
|
90
|
+
local points = {}
|
|
91
|
+
points[1] = delta
|
|
92
|
+
for i = 2, N do
|
|
93
|
+
points[i] = 0
|
|
94
|
+
end
|
|
95
|
+
for from, to in batches(#points, 7000) do
|
|
96
|
+
rcall("LPUSH", dataPointsList, unpack(points, from, to))
|
|
97
|
+
end
|
|
98
|
+
else
|
|
99
|
+
-- LPUSH delta to the list
|
|
100
|
+
rcall("LPUSH", dataPointsList, delta)
|
|
101
|
+
end
|
|
102
|
+
-- LTRIM to keep list to its max size
|
|
103
|
+
rcall("LTRIM", dataPointsList, 0, maxDataPoints - 1)
|
|
104
|
+
-- update prev count with current count
|
|
105
|
+
rcall("HSET", metaKey, "prevCount", count, "prevTS", timestamp)
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
--[[
|
|
109
|
+
Function to return the next delayed job timestamp.
|
|
110
|
+
]]
|
|
111
|
+
local function getNextDelayedTimestamp(delayedKey)
|
|
112
|
+
local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES")
|
|
113
|
+
if #result then
|
|
114
|
+
local nextTimestamp = tonumber(result[2])
|
|
115
|
+
if nextTimestamp ~= nil then
|
|
116
|
+
return nextTimestamp / 0x1000
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
--[[
|
|
121
|
+
Function to get current rate limit ttl.
|
|
122
|
+
]]
|
|
123
|
+
local function getRateLimitTTL(maxJobs, rateLimiterKey)
|
|
124
|
+
if maxJobs and maxJobs <= tonumber(rcall("GET", rateLimiterKey) or 0) then
|
|
125
|
+
local pttl = rcall("PTTL", rateLimiterKey)
|
|
126
|
+
if pttl == 0 then
|
|
127
|
+
rcall("DEL", rateLimiterKey)
|
|
128
|
+
end
|
|
129
|
+
if pttl > 0 then
|
|
130
|
+
return pttl
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
return 0
|
|
134
|
+
end
|
|
135
|
+
--[[
|
|
136
|
+
Function to check for the meta.paused key to decide if we are paused or not
|
|
137
|
+
(since an empty list and !EXISTS are not really the same).
|
|
138
|
+
]]
|
|
139
|
+
local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey)
|
|
140
|
+
local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency")
|
|
141
|
+
if queueAttributes[1] then
|
|
142
|
+
return pausedKey, true
|
|
143
|
+
else
|
|
144
|
+
if queueAttributes[2] then
|
|
145
|
+
local activeCount = rcall("LLEN", activeKey)
|
|
146
|
+
if activeCount >= tonumber(queueAttributes[2]) then
|
|
147
|
+
return waitKey, true
|
|
148
|
+
else
|
|
149
|
+
return waitKey, false
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
return waitKey, false
|
|
154
|
+
end
|
|
155
|
+
--[[
|
|
156
|
+
Function to move job from prioritized state to active.
|
|
157
|
+
]]
|
|
158
|
+
local function moveJobFromPriorityToActive(priorityKey, activeKey, priorityCounterKey)
|
|
159
|
+
local prioritizedJob = rcall("ZPOPMIN", priorityKey)
|
|
160
|
+
if #prioritizedJob > 0 then
|
|
161
|
+
rcall("LPUSH", activeKey, prioritizedJob[1])
|
|
162
|
+
return prioritizedJob[1]
|
|
163
|
+
else
|
|
164
|
+
rcall("DEL", priorityCounterKey)
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
--[[
|
|
168
|
+
Function to recursively move from waitingChildren to failed.
|
|
169
|
+
]]
|
|
170
|
+
-- Includes
|
|
171
|
+
--[[
|
|
172
|
+
Validate and move parent to active if needed.
|
|
173
|
+
]]
|
|
174
|
+
-- Includes
|
|
175
|
+
--[[
|
|
176
|
+
Add delay marker if needed.
|
|
177
|
+
]]
|
|
178
|
+
-- Includes
|
|
179
|
+
local function addDelayMarkerIfNeeded(markerKey, delayedKey)
|
|
180
|
+
local nextTimestamp = getNextDelayedTimestamp(delayedKey)
|
|
181
|
+
if nextTimestamp ~= nil then
|
|
182
|
+
-- Replace the score of the marker with the newest known
|
|
183
|
+
-- next timestamp.
|
|
184
|
+
rcall("ZADD", markerKey, nextTimestamp, "1")
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
--[[
|
|
188
|
+
Function to add job in target list and add marker if needed.
|
|
189
|
+
]]
|
|
190
|
+
-- Includes
|
|
191
|
+
--[[
|
|
192
|
+
Add marker if needed when a job is available.
|
|
193
|
+
]]
|
|
194
|
+
local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed)
|
|
195
|
+
if not isPausedOrMaxed then
|
|
196
|
+
rcall("ZADD", markerKey, 0, "0")
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId)
|
|
200
|
+
rcall(pushCmd, targetKey, jobId)
|
|
201
|
+
addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed)
|
|
202
|
+
end
|
|
203
|
+
--[[
|
|
204
|
+
Function to add job considering priority.
|
|
205
|
+
]]
|
|
206
|
+
-- Includes
|
|
207
|
+
local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey,
|
|
208
|
+
isPausedOrMaxed)
|
|
209
|
+
local prioCounter = rcall("INCR", priorityCounterKey)
|
|
210
|
+
local score = priority * 0x100000000 + prioCounter % 0x100000000
|
|
211
|
+
rcall("ZADD", prioritizedKey, score, jobId)
|
|
212
|
+
addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed)
|
|
213
|
+
end
|
|
214
|
+
--[[
|
|
215
|
+
Function to check if queue is paused or maxed
|
|
216
|
+
(since an empty list and !EXISTS are not really the same).
|
|
217
|
+
]]
|
|
218
|
+
local function isQueuePausedOrMaxed(queueMetaKey, activeKey)
|
|
219
|
+
local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency")
|
|
220
|
+
if queueAttributes[1] then
|
|
221
|
+
return true
|
|
222
|
+
else
|
|
223
|
+
if queueAttributes[2] then
|
|
224
|
+
local activeCount = rcall("LLEN", activeKey)
|
|
225
|
+
return activeCount >= tonumber(queueAttributes[2])
|
|
226
|
+
end
|
|
227
|
+
end
|
|
228
|
+
return false
|
|
229
|
+
end
|
|
230
|
+
local function moveParentToWaitIfNeeded(parentQueueKey, parentDependenciesKey,
|
|
231
|
+
parentKey, parentId, timestamp)
|
|
232
|
+
local isParentActive = rcall("ZSCORE",
|
|
233
|
+
parentQueueKey .. ":waiting-children", parentId)
|
|
234
|
+
if rcall("SCARD", parentDependenciesKey) == 0 and isParentActive then
|
|
235
|
+
rcall("ZREM", parentQueueKey .. ":waiting-children", parentId)
|
|
236
|
+
local parentWaitKey = parentQueueKey .. ":wait"
|
|
237
|
+
local parentPausedKey = parentQueueKey .. ":paused"
|
|
238
|
+
local parentActiveKey = parentQueueKey .. ":active"
|
|
239
|
+
local parentMetaKey = parentQueueKey .. ":meta"
|
|
240
|
+
local parentMarkerKey = parentQueueKey .. ":marker"
|
|
241
|
+
local jobAttributes = rcall("HMGET", parentKey, "priority", "delay")
|
|
242
|
+
local priority = tonumber(jobAttributes[1]) or 0
|
|
243
|
+
local delay = tonumber(jobAttributes[2]) or 0
|
|
244
|
+
if delay > 0 then
|
|
245
|
+
local delayedTimestamp = tonumber(timestamp) + delay
|
|
246
|
+
local score = delayedTimestamp * 0x1000
|
|
247
|
+
local parentDelayedKey = parentQueueKey .. ":delayed"
|
|
248
|
+
rcall("ZADD", parentDelayedKey, score, parentId)
|
|
249
|
+
rcall("XADD", parentQueueKey .. ":events", "*", "event", "delayed",
|
|
250
|
+
"jobId", parentId, "delay", delayedTimestamp)
|
|
251
|
+
addDelayMarkerIfNeeded(parentMarkerKey, parentDelayedKey)
|
|
252
|
+
else
|
|
253
|
+
if priority == 0 then
|
|
254
|
+
local parentTarget, isParentPausedOrMaxed =
|
|
255
|
+
getTargetQueueList(parentMetaKey, parentActiveKey, parentWaitKey,
|
|
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")
|
|
267
|
+
end
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
--[[
|
|
271
|
+
Function to remove deduplication key if needed.
|
|
272
|
+
]]
|
|
273
|
+
local function removeDeduplicationKeyIfNeeded(prefixKey, deduplicationId)
|
|
274
|
+
if deduplicationId then
|
|
275
|
+
local deduplicationKey = prefixKey .. "de:" .. deduplicationId
|
|
276
|
+
local pttl = rcall("PTTL", deduplicationKey)
|
|
277
|
+
if pttl == 0 or pttl == -1 then
|
|
278
|
+
rcall("DEL", deduplicationKey)
|
|
279
|
+
end
|
|
280
|
+
end
|
|
281
|
+
end
|
|
282
|
+
--[[
|
|
283
|
+
Functions to remove jobs when removeOnFail option is provided.
|
|
284
|
+
]]
|
|
285
|
+
-- Includes
|
|
286
|
+
--[[
|
|
287
|
+
Function to remove job.
|
|
288
|
+
]]
|
|
289
|
+
-- Includes
|
|
290
|
+
--[[
|
|
291
|
+
Function to remove deduplication key.
|
|
292
|
+
]]
|
|
293
|
+
local function removeDeduplicationKey(prefixKey, jobKey)
|
|
294
|
+
local deduplicationId = rcall("HGET", jobKey, "deid")
|
|
295
|
+
if deduplicationId then
|
|
296
|
+
local deduplicationKey = prefixKey .. "de:" .. deduplicationId
|
|
297
|
+
rcall("DEL", deduplicationKey)
|
|
298
|
+
end
|
|
299
|
+
end
|
|
300
|
+
--[[
|
|
301
|
+
Function to remove job keys.
|
|
302
|
+
]]
|
|
303
|
+
local function removeJobKeys(jobKey)
|
|
304
|
+
return rcall("DEL", jobKey, jobKey .. ':logs',
|
|
305
|
+
jobKey .. ':dependencies', jobKey .. ':processed', jobKey .. ':failed')
|
|
306
|
+
end
|
|
307
|
+
--[[
|
|
308
|
+
Check if this job has a parent. If so we will just remove it from
|
|
309
|
+
the parent child list, but if it is the last child we should move the parent to "wait/paused"
|
|
310
|
+
which requires code from "moveToFinished"
|
|
311
|
+
]]
|
|
312
|
+
-- Includes
|
|
313
|
+
--[[
|
|
314
|
+
Functions to destructure job key.
|
|
315
|
+
Just a bit of warning, these functions may be a bit slow and affect performance significantly.
|
|
316
|
+
]]
|
|
317
|
+
local getJobIdFromKey = function (jobKey)
|
|
318
|
+
return string.match(jobKey, ".*:(.*)")
|
|
319
|
+
end
|
|
320
|
+
local getJobKeyPrefix = function (jobKey, jobId)
|
|
321
|
+
return string.sub(jobKey, 0, #jobKey - #jobId)
|
|
322
|
+
end
|
|
323
|
+
local function moveParentToWait(parentPrefix, parentId, emitEvent)
|
|
324
|
+
local parentTarget, isPausedOrMaxed = getTargetQueueList(parentPrefix .. "meta", parentPrefix .. "active",
|
|
325
|
+
parentPrefix .. "wait", parentPrefix .. "paused")
|
|
326
|
+
addJobInTargetList(parentTarget, parentPrefix .. "marker", "RPUSH", isPausedOrMaxed, parentId)
|
|
327
|
+
if emitEvent then
|
|
328
|
+
local parentEventStream = parentPrefix .. "events"
|
|
329
|
+
rcall("XADD", parentEventStream, "*", "event", "waiting", "jobId", parentId, "prev", "waiting-children")
|
|
330
|
+
end
|
|
331
|
+
end
|
|
332
|
+
local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debounceId)
|
|
333
|
+
if parentKey then
|
|
334
|
+
local parentDependenciesKey = parentKey .. ":dependencies"
|
|
335
|
+
local result = rcall("SREM", parentDependenciesKey, jobKey)
|
|
336
|
+
if result > 0 then
|
|
337
|
+
local pendingDependencies = rcall("SCARD", parentDependenciesKey)
|
|
338
|
+
if pendingDependencies == 0 then
|
|
339
|
+
local parentId = getJobIdFromKey(parentKey)
|
|
340
|
+
local parentPrefix = getJobKeyPrefix(parentKey, parentId)
|
|
341
|
+
local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId)
|
|
342
|
+
if numRemovedElements == 1 then
|
|
343
|
+
if hard then -- remove parent in same queue
|
|
344
|
+
if parentPrefix == baseKey then
|
|
345
|
+
removeParentDependencyKey(parentKey, hard, nil, baseKey, nil)
|
|
346
|
+
removeJobKeys(parentKey)
|
|
347
|
+
if debounceId then
|
|
348
|
+
rcall("DEL", parentPrefix .. "de:" .. debounceId)
|
|
349
|
+
end
|
|
350
|
+
else
|
|
351
|
+
moveParentToWait(parentPrefix, parentId)
|
|
352
|
+
end
|
|
353
|
+
else
|
|
354
|
+
moveParentToWait(parentPrefix, parentId, true)
|
|
355
|
+
end
|
|
356
|
+
end
|
|
357
|
+
end
|
|
358
|
+
return true
|
|
359
|
+
end
|
|
360
|
+
else
|
|
361
|
+
local parentAttributes = rcall("HMGET", jobKey, "parentKey", "deid")
|
|
362
|
+
local missedParentKey = parentAttributes[1]
|
|
363
|
+
if( (type(missedParentKey) == "string") and missedParentKey ~= ""
|
|
364
|
+
and (rcall("EXISTS", missedParentKey) == 1)) then
|
|
365
|
+
local parentDependenciesKey = missedParentKey .. ":dependencies"
|
|
366
|
+
local result = rcall("SREM", parentDependenciesKey, jobKey)
|
|
367
|
+
if result > 0 then
|
|
368
|
+
local pendingDependencies = rcall("SCARD", parentDependenciesKey)
|
|
369
|
+
if pendingDependencies == 0 then
|
|
370
|
+
local parentId = getJobIdFromKey(missedParentKey)
|
|
371
|
+
local parentPrefix = getJobKeyPrefix(missedParentKey, parentId)
|
|
372
|
+
local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId)
|
|
373
|
+
if numRemovedElements == 1 then
|
|
374
|
+
if hard then
|
|
375
|
+
if parentPrefix == baseKey then
|
|
376
|
+
removeParentDependencyKey(missedParentKey, hard, nil, baseKey, nil)
|
|
377
|
+
removeJobKeys(missedParentKey)
|
|
378
|
+
if parentAttributes[2] then
|
|
379
|
+
rcall("DEL", parentPrefix .. "de:" .. parentAttributes[2])
|
|
380
|
+
end
|
|
381
|
+
else
|
|
382
|
+
moveParentToWait(parentPrefix, parentId)
|
|
383
|
+
end
|
|
384
|
+
else
|
|
385
|
+
moveParentToWait(parentPrefix, parentId, true)
|
|
386
|
+
end
|
|
387
|
+
end
|
|
388
|
+
end
|
|
389
|
+
return true
|
|
390
|
+
end
|
|
391
|
+
end
|
|
392
|
+
end
|
|
393
|
+
return false
|
|
394
|
+
end
|
|
395
|
+
local function removeJob(jobId, hard, baseKey, shouldRemoveDeduplicationKey)
|
|
396
|
+
local jobKey = baseKey .. jobId
|
|
397
|
+
removeParentDependencyKey(jobKey, hard, nil, baseKey)
|
|
398
|
+
if shouldRemoveDeduplicationKey then
|
|
399
|
+
removeDeduplicationKey(baseKey, jobKey)
|
|
400
|
+
end
|
|
401
|
+
removeJobKeys(jobKey)
|
|
402
|
+
end
|
|
403
|
+
--[[
|
|
404
|
+
Functions to remove jobs by max age.
|
|
405
|
+
]]
|
|
406
|
+
-- Includes
|
|
407
|
+
local function removeJobsByMaxAge(timestamp, maxAge, targetSet, prefix,
|
|
408
|
+
shouldRemoveDebounceKey)
|
|
409
|
+
local start = timestamp - maxAge * 1000
|
|
410
|
+
local jobIds = rcall("ZREVRANGEBYSCORE", targetSet, start, "-inf")
|
|
411
|
+
for i, jobId in ipairs(jobIds) do
|
|
412
|
+
removeJob(jobId, false, prefix, false --[[remove debounce key]])
|
|
413
|
+
end
|
|
414
|
+
rcall("ZREMRANGEBYSCORE", targetSet, "-inf", start)
|
|
415
|
+
end
|
|
416
|
+
--[[
|
|
417
|
+
Functions to remove jobs by max count.
|
|
418
|
+
]]
|
|
419
|
+
-- Includes
|
|
420
|
+
local function removeJobsByMaxCount(maxCount, targetSet, prefix)
|
|
421
|
+
local start = maxCount
|
|
422
|
+
local jobIds = rcall("ZREVRANGE", targetSet, start, -1)
|
|
423
|
+
for i, jobId in ipairs(jobIds) do
|
|
424
|
+
removeJob(jobId, false, prefix, false --[[remove debounce key]])
|
|
425
|
+
end
|
|
426
|
+
rcall("ZREMRANGEBYRANK", targetSet, 0, -(maxCount + 1))
|
|
427
|
+
end
|
|
428
|
+
local function removeJobsOnFail(queueKeyPrefix, failedKey, jobId, opts, timestamp)
|
|
429
|
+
local removeOnFailType = type(opts["removeOnFail"])
|
|
430
|
+
if removeOnFailType == "number" then
|
|
431
|
+
removeJobsByMaxCount(opts["removeOnFail"],
|
|
432
|
+
failedKey, queueKeyPrefix)
|
|
433
|
+
elseif removeOnFailType == "boolean" then
|
|
434
|
+
if opts["removeOnFail"] then
|
|
435
|
+
removeJob(jobId, false, queueKeyPrefix,
|
|
436
|
+
false --[[remove debounce key]])
|
|
437
|
+
rcall("ZREM", failedKey, jobId)
|
|
438
|
+
end
|
|
439
|
+
elseif removeOnFailType ~= "nil" then
|
|
440
|
+
local maxAge = opts["removeOnFail"]["age"]
|
|
441
|
+
local maxCount = opts["removeOnFail"]["count"]
|
|
442
|
+
if maxAge ~= nil then
|
|
443
|
+
removeJobsByMaxAge(timestamp, maxAge,
|
|
444
|
+
failedKey, queueKeyPrefix)
|
|
445
|
+
end
|
|
446
|
+
if maxCount ~= nil and maxCount > 0 then
|
|
447
|
+
removeJobsByMaxCount(maxCount, failedKey,
|
|
448
|
+
queueKeyPrefix)
|
|
449
|
+
end
|
|
450
|
+
end
|
|
451
|
+
end
|
|
452
|
+
local function moveParentFromWaitingChildrenToFailed( parentQueueKey, parentKey, parentId, jobIdKey, timestamp)
|
|
453
|
+
if rcall("ZREM", parentQueueKey .. ":waiting-children", parentId) == 1 then
|
|
454
|
+
local parentQueuePrefix = parentQueueKey .. ":"
|
|
455
|
+
local parentFailedKey = parentQueueKey .. ":failed"
|
|
456
|
+
rcall("ZADD", parentFailedKey, timestamp, parentId)
|
|
457
|
+
local failedReason = "child " .. jobIdKey .. " failed"
|
|
458
|
+
rcall("HMSET", parentKey, "failedReason", failedReason, "finishedOn", timestamp)
|
|
459
|
+
rcall("XADD", parentQueueKey .. ":events", "*", "event", "failed", "jobId", parentId, "failedReason",
|
|
460
|
+
failedReason, "prev", "waiting-children")
|
|
461
|
+
local jobAttributes = rcall("HMGET", parentKey, "parent", "deid", "opts")
|
|
462
|
+
removeDeduplicationKeyIfNeeded(parentQueueKey .. ":", jobAttributes[2])
|
|
463
|
+
if jobAttributes[1] then
|
|
464
|
+
local parentData = cjson.decode(jobAttributes[1])
|
|
465
|
+
if parentData['fpof'] then
|
|
466
|
+
moveParentFromWaitingChildrenToFailed(
|
|
467
|
+
parentData['queueKey'],
|
|
468
|
+
parentData['queueKey'] .. ':' .. parentData['id'],
|
|
469
|
+
parentData['id'],
|
|
470
|
+
parentKey,
|
|
471
|
+
timestamp
|
|
472
|
+
)
|
|
473
|
+
elseif parentData['idof'] or parentData['rdof'] then
|
|
474
|
+
local grandParentKey = parentData['queueKey'] .. ':' .. parentData['id']
|
|
475
|
+
local grandParentDependenciesSet = grandParentKey .. ":dependencies"
|
|
476
|
+
if rcall("SREM", grandParentDependenciesSet, parentKey) == 1 then
|
|
477
|
+
moveParentToWaitIfNeeded(parentData['queueKey'], grandParentDependenciesSet,
|
|
478
|
+
grandParentKey, parentData['id'], timestamp)
|
|
479
|
+
if parentData['idof'] then
|
|
480
|
+
local grandParentFailedSet = grandParentKey .. ":failed"
|
|
481
|
+
rcall("HSET", grandParentFailedSet, parentKey, failedReason)
|
|
482
|
+
end
|
|
483
|
+
end
|
|
484
|
+
end
|
|
485
|
+
end
|
|
486
|
+
local parentRawOpts = jobAttributes[3]
|
|
487
|
+
local parentOpts = cjson.decode(parentRawOpts)
|
|
488
|
+
removeJobsOnFail(parentQueuePrefix, parentFailedKey, parentId, parentOpts, timestamp)
|
|
489
|
+
end
|
|
490
|
+
end
|
|
491
|
+
--[[
|
|
492
|
+
Function to move job from wait state to active.
|
|
493
|
+
Input:
|
|
494
|
+
opts - token - lock token
|
|
495
|
+
opts - lockDuration
|
|
496
|
+
opts - limiter
|
|
497
|
+
]]
|
|
498
|
+
-- Includes
|
|
499
|
+
local function prepareJobForProcessing(keyPrefix, rateLimiterKey, eventStreamKey,
|
|
500
|
+
jobId, processedOn, maxJobs, markerKey, opts)
|
|
501
|
+
local jobKey = keyPrefix .. jobId
|
|
502
|
+
-- Check if we need to perform rate limiting.
|
|
503
|
+
if maxJobs then
|
|
504
|
+
local jobCounter = tonumber(rcall("INCR", rateLimiterKey))
|
|
505
|
+
if jobCounter == 1 then
|
|
506
|
+
local limiterDuration = opts['limiter'] and opts['limiter']['duration']
|
|
507
|
+
local integerDuration = math.floor(math.abs(limiterDuration))
|
|
508
|
+
rcall("PEXPIRE", rateLimiterKey, integerDuration)
|
|
509
|
+
end
|
|
510
|
+
end
|
|
511
|
+
local lockKey = jobKey .. ':lock'
|
|
512
|
+
-- get a lock
|
|
513
|
+
if opts['token'] ~= "0" then
|
|
514
|
+
rcall("SET", lockKey, opts['token'], "PX", opts['lockDuration'])
|
|
515
|
+
end
|
|
516
|
+
local optionalValues = {}
|
|
517
|
+
if opts['name'] then
|
|
518
|
+
-- Set "processedBy" field to the worker name
|
|
519
|
+
table.insert(optionalValues, "pb")
|
|
520
|
+
table.insert(optionalValues, opts['name'])
|
|
521
|
+
end
|
|
522
|
+
rcall("XADD", eventStreamKey, "*", "event", "active", "jobId", jobId, "prev", "waiting")
|
|
523
|
+
rcall("HMSET", jobKey, "processedOn", processedOn, unpack(optionalValues))
|
|
524
|
+
rcall("HINCRBY", jobKey, "ats", 1)
|
|
525
|
+
addBaseMarkerIfNeeded(markerKey, false)
|
|
526
|
+
return {rcall("HGETALL", jobKey), jobId, 0, 0} -- get job data
|
|
527
|
+
end
|
|
528
|
+
--[[
|
|
529
|
+
Updates the delay set, by moving delayed jobs that should
|
|
530
|
+
be processed now to "wait".
|
|
531
|
+
Events:
|
|
532
|
+
'waiting'
|
|
533
|
+
]]
|
|
534
|
+
-- Includes
|
|
535
|
+
-- Try to get as much as 1000 jobs at once
|
|
536
|
+
local function promoteDelayedJobs(delayedKey, markerKey, targetKey, prioritizedKey,
|
|
537
|
+
eventStreamKey, prefix, timestamp, priorityCounterKey, isPaused)
|
|
538
|
+
local jobs = rcall("ZRANGEBYSCORE", delayedKey, 0, (timestamp + 1) * 0x1000 - 1, "LIMIT", 0, 1000)
|
|
539
|
+
if (#jobs > 0) then
|
|
540
|
+
rcall("ZREM", delayedKey, unpack(jobs))
|
|
541
|
+
for _, jobId in ipairs(jobs) do
|
|
542
|
+
local jobKey = prefix .. jobId
|
|
543
|
+
local priority =
|
|
544
|
+
tonumber(rcall("HGET", jobKey, "priority")) or 0
|
|
545
|
+
if priority == 0 then
|
|
546
|
+
-- LIFO or FIFO
|
|
547
|
+
addJobInTargetList(targetKey, markerKey, "LPUSH", isPaused, jobId)
|
|
548
|
+
else
|
|
549
|
+
addJobWithPriority(markerKey, prioritizedKey, priority,
|
|
550
|
+
jobId, priorityCounterKey, isPaused)
|
|
551
|
+
end
|
|
552
|
+
-- Emit waiting event
|
|
553
|
+
rcall("XADD", eventStreamKey, "*", "event", "waiting", "jobId",
|
|
554
|
+
jobId, "prev", "delayed")
|
|
555
|
+
rcall("HSET", jobKey, "delay", 0)
|
|
556
|
+
end
|
|
557
|
+
end
|
|
558
|
+
end
|
|
559
|
+
local function removeLock(jobKey, stalledKey, token, jobId)
|
|
560
|
+
if token ~= "0" then
|
|
561
|
+
local lockKey = jobKey .. ':lock'
|
|
562
|
+
local lockToken = rcall("GET", lockKey)
|
|
563
|
+
if lockToken == token then
|
|
564
|
+
rcall("DEL", lockKey)
|
|
565
|
+
rcall("SREM", stalledKey, jobId)
|
|
566
|
+
else
|
|
567
|
+
if lockToken then
|
|
568
|
+
-- Lock exists but token does not match
|
|
569
|
+
return -6
|
|
570
|
+
else
|
|
571
|
+
-- Lock is missing completely
|
|
572
|
+
return -2
|
|
573
|
+
end
|
|
574
|
+
end
|
|
575
|
+
end
|
|
576
|
+
return 0
|
|
577
|
+
end
|
|
578
|
+
--[[
|
|
579
|
+
Function to trim events, default 10000.
|
|
580
|
+
]]
|
|
581
|
+
-- Includes
|
|
582
|
+
--[[
|
|
583
|
+
Function to get max events value or set by default 10000.
|
|
584
|
+
]]
|
|
585
|
+
local function getOrSetMaxEvents(metaKey)
|
|
586
|
+
local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents")
|
|
587
|
+
if not maxEvents then
|
|
588
|
+
maxEvents = 10000
|
|
589
|
+
rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents)
|
|
590
|
+
end
|
|
591
|
+
return maxEvents
|
|
592
|
+
end
|
|
593
|
+
local function trimEvents(metaKey, eventStreamKey)
|
|
594
|
+
local maxEvents = getOrSetMaxEvents(metaKey)
|
|
595
|
+
if maxEvents ~= false then
|
|
596
|
+
rcall("XTRIM", eventStreamKey, "MAXLEN", "~", maxEvents)
|
|
597
|
+
else
|
|
598
|
+
rcall("XTRIM", eventStreamKey, "MAXLEN", "~", 10000)
|
|
599
|
+
end
|
|
600
|
+
end
|
|
601
|
+
--[[
|
|
602
|
+
Validate and move or add dependencies to parent.
|
|
603
|
+
]]
|
|
604
|
+
-- Includes
|
|
605
|
+
local function updateParentDepsIfNeeded(parentKey, parentQueueKey, parentDependenciesKey,
|
|
606
|
+
parentId, jobIdKey, returnvalue, timestamp )
|
|
607
|
+
local processedSet = parentKey .. ":processed"
|
|
608
|
+
rcall("HSET", processedSet, jobIdKey, returnvalue)
|
|
609
|
+
moveParentToWaitIfNeeded(parentQueueKey, parentDependenciesKey, parentKey, parentId, timestamp)
|
|
610
|
+
end
|
|
611
|
+
--[[
|
|
612
|
+
Function to update a bunch of fields in a job.
|
|
613
|
+
]]
|
|
614
|
+
local function updateJobFields(jobKey, msgpackedFields)
|
|
615
|
+
if msgpackedFields and #msgpackedFields > 0 then
|
|
616
|
+
local fieldsToUpdate = cmsgpack.unpack(msgpackedFields)
|
|
617
|
+
if fieldsToUpdate then
|
|
618
|
+
redis.call("HMSET", jobKey, unpack(fieldsToUpdate))
|
|
619
|
+
end
|
|
620
|
+
end
|
|
621
|
+
end
|
|
622
|
+
local jobIdKey = KEYS[12]
|
|
623
|
+
if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists
|
|
624
|
+
local opts = cmsgpack.unpack(ARGV[8])
|
|
625
|
+
local token = opts['token']
|
|
626
|
+
local errorCode = removeLock(jobIdKey, KEYS[5], token, ARGV[1])
|
|
627
|
+
if errorCode < 0 then
|
|
628
|
+
return errorCode
|
|
629
|
+
end
|
|
630
|
+
updateJobFields(jobIdKey, ARGV[9]);
|
|
631
|
+
local attempts = opts['attempts']
|
|
632
|
+
local maxMetricsSize = opts['maxMetricsSize']
|
|
633
|
+
local maxCount = opts['keepJobs']['count']
|
|
634
|
+
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
|
+
local jobAttributes = rcall("HMGET", jobIdKey, "parentKey", "parent", "deid")
|
|
639
|
+
local parentKey = jobAttributes[1] or ""
|
|
640
|
+
local parentId = ""
|
|
641
|
+
local parentQueueKey = ""
|
|
642
|
+
if jobAttributes[2] ~= false then
|
|
643
|
+
local jsonDecodedParent = cjson.decode(jobAttributes[2])
|
|
644
|
+
parentId = jsonDecodedParent['id']
|
|
645
|
+
parentQueueKey = jsonDecodedParent['queueKey']
|
|
646
|
+
end
|
|
647
|
+
local jobId = ARGV[1]
|
|
648
|
+
local timestamp = ARGV[2]
|
|
649
|
+
-- Remove from active list (if not active we shall return error)
|
|
650
|
+
local numRemovedElements = rcall("LREM", KEYS[2], -1, jobId)
|
|
651
|
+
if (numRemovedElements < 1) then return -3 end
|
|
652
|
+
local eventStreamKey = KEYS[4]
|
|
653
|
+
local metaKey = KEYS[9]
|
|
654
|
+
-- Trim events before emiting them to avoid trimming events emitted in this script
|
|
655
|
+
trimEvents(metaKey, eventStreamKey)
|
|
656
|
+
local prefix = ARGV[7]
|
|
657
|
+
removeDeduplicationKeyIfNeeded(prefix, jobAttributes[3])
|
|
658
|
+
-- If job has a parent we need to
|
|
659
|
+
-- 1) remove this job id from parents dependencies
|
|
660
|
+
-- 2) move the job Id to parent "processed" set
|
|
661
|
+
-- 3) push the results into parent "results" list
|
|
662
|
+
-- 4) if parent's dependencies is empty, then move parent to "wait/paused". Note it may be a different queue!.
|
|
663
|
+
if parentId == "" and parentKey ~= "" then
|
|
664
|
+
parentId = getJobIdFromKey(parentKey)
|
|
665
|
+
parentQueueKey = getJobKeyPrefix(parentKey, ":" .. parentId)
|
|
666
|
+
end
|
|
667
|
+
if parentId ~= "" then
|
|
668
|
+
if ARGV[5] == "completed" then
|
|
669
|
+
local dependenciesSet = parentKey .. ":dependencies"
|
|
670
|
+
if rcall("SREM", dependenciesSet, jobIdKey) == 1 then
|
|
671
|
+
updateParentDepsIfNeeded(parentKey, parentQueueKey,
|
|
672
|
+
dependenciesSet, parentId, jobIdKey,
|
|
673
|
+
ARGV[4], timestamp)
|
|
674
|
+
end
|
|
675
|
+
else
|
|
676
|
+
if opts['fpof'] then
|
|
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
|
|
691
|
+
end
|
|
692
|
+
end
|
|
693
|
+
local attemptsMade = rcall("HINCRBY", jobIdKey, "atm", 1)
|
|
694
|
+
-- Remove job?
|
|
695
|
+
if maxCount ~= 0 then
|
|
696
|
+
local targetSet = KEYS[11]
|
|
697
|
+
-- Add to complete/failed set
|
|
698
|
+
rcall("ZADD", targetSet, timestamp, jobId)
|
|
699
|
+
rcall("HMSET", jobIdKey, ARGV[3], ARGV[4], "finishedOn", timestamp)
|
|
700
|
+
-- "returnvalue" / "failedReason" and "finishedOn"
|
|
701
|
+
-- Remove old jobs?
|
|
702
|
+
if maxAge ~= nil then
|
|
703
|
+
removeJobsByMaxAge(timestamp, maxAge, targetSet, prefix)
|
|
704
|
+
end
|
|
705
|
+
if maxCount ~= nil and maxCount > 0 then
|
|
706
|
+
removeJobsByMaxCount(maxCount, targetSet, prefix)
|
|
707
|
+
end
|
|
708
|
+
else
|
|
709
|
+
removeJobKeys(jobIdKey)
|
|
710
|
+
if parentKey ~= "" then
|
|
711
|
+
-- TODO: when a child is removed when finished, result or failure in parent
|
|
712
|
+
-- must not be deleted, those value references should be deleted when the parent
|
|
713
|
+
-- is deleted
|
|
714
|
+
removeParentDependencyKey(jobIdKey, false, parentKey, jobAttributes[3])
|
|
715
|
+
end
|
|
716
|
+
end
|
|
717
|
+
rcall("XADD", eventStreamKey, "*", "event", ARGV[5], "jobId", jobId, ARGV[3],
|
|
718
|
+
ARGV[4])
|
|
719
|
+
if ARGV[5] == "failed" then
|
|
720
|
+
if tonumber(attemptsMade) >= tonumber(attempts) then
|
|
721
|
+
rcall("XADD", eventStreamKey, "*", "event", "retries-exhausted", "jobId",
|
|
722
|
+
jobId, "attemptsMade", attemptsMade)
|
|
723
|
+
end
|
|
724
|
+
end
|
|
725
|
+
-- Collect metrics
|
|
726
|
+
if maxMetricsSize ~= "" then
|
|
727
|
+
collectMetrics(KEYS[13], KEYS[13] .. ':data', maxMetricsSize, timestamp)
|
|
728
|
+
end
|
|
729
|
+
-- Try to get next job to avoid an extra roundtrip if the queue is not closing,
|
|
730
|
+
-- and not rate limited.
|
|
731
|
+
if (ARGV[6] == "1") then
|
|
732
|
+
local target, isPausedOrMaxed = getTargetQueueList(metaKey, KEYS[2], KEYS[1], KEYS[8])
|
|
733
|
+
local markerKey = KEYS[14]
|
|
734
|
+
-- Check if there are delayed jobs that can be promoted
|
|
735
|
+
promoteDelayedJobs(KEYS[7], markerKey, target, KEYS[3], eventStreamKey, prefix,
|
|
736
|
+
timestamp, KEYS[10], isPausedOrMaxed)
|
|
737
|
+
local maxJobs = tonumber(opts['limiter'] and opts['limiter']['max'])
|
|
738
|
+
-- Check if we are rate limited first.
|
|
739
|
+
local expireTime = getRateLimitTTL(maxJobs, KEYS[6])
|
|
740
|
+
if expireTime > 0 then return {0, 0, expireTime, 0} end
|
|
741
|
+
-- paused or maxed queue
|
|
742
|
+
if isPausedOrMaxed then return {0, 0, 0, 0} end
|
|
743
|
+
jobId = rcall("RPOPLPUSH", KEYS[1], KEYS[2])
|
|
744
|
+
if jobId then
|
|
745
|
+
-- Markers in waitlist DEPRECATED in v5: Remove in v6.
|
|
746
|
+
if string.sub(jobId, 1, 2) == "0:" then
|
|
747
|
+
rcall("LREM", KEYS[2], 1, jobId)
|
|
748
|
+
-- If jobId is special ID 0:delay (delay greater than 0), then there is no job to process
|
|
749
|
+
-- but if ID is 0:0, then there is at least 1 prioritized job to process
|
|
750
|
+
if jobId == "0:0" then
|
|
751
|
+
jobId = moveJobFromPriorityToActive(KEYS[3], KEYS[2],
|
|
752
|
+
KEYS[10])
|
|
753
|
+
return prepareJobForProcessing(prefix, KEYS[6], eventStreamKey, jobId,
|
|
754
|
+
timestamp, maxJobs, markerKey,
|
|
755
|
+
opts)
|
|
756
|
+
end
|
|
757
|
+
else
|
|
758
|
+
return prepareJobForProcessing(prefix, KEYS[6], eventStreamKey, jobId,
|
|
759
|
+
timestamp, maxJobs, markerKey,
|
|
760
|
+
opts)
|
|
761
|
+
end
|
|
762
|
+
else
|
|
763
|
+
jobId = moveJobFromPriorityToActive(KEYS[3], KEYS[2], KEYS[10])
|
|
764
|
+
if jobId then
|
|
765
|
+
return prepareJobForProcessing(prefix, KEYS[6], eventStreamKey, jobId,
|
|
766
|
+
timestamp, maxJobs, markerKey,
|
|
767
|
+
opts)
|
|
768
|
+
end
|
|
769
|
+
end
|
|
770
|
+
-- Return the timestamp for the next delayed job if any.
|
|
771
|
+
local nextTimestamp = getNextDelayedTimestamp(KEYS[7])
|
|
772
|
+
if nextTimestamp ~= nil then
|
|
773
|
+
-- The result is guaranteed to be positive, since the
|
|
774
|
+
-- ZRANGEBYSCORE command would have return a job otherwise.
|
|
775
|
+
return {0, 0, 0, nextTimestamp}
|
|
776
|
+
end
|
|
777
|
+
end
|
|
778
|
+
local waitLen = rcall("LLEN", KEYS[1])
|
|
779
|
+
if waitLen == 0 then
|
|
780
|
+
local activeLen = rcall("LLEN", KEYS[2])
|
|
781
|
+
if activeLen == 0 then
|
|
782
|
+
local prioritizedLen = rcall("ZCARD", KEYS[3])
|
|
783
|
+
if prioritizedLen == 0 then
|
|
784
|
+
rcall("XADD", eventStreamKey, "*", "event", "drained")
|
|
785
|
+
end
|
|
786
|
+
end
|
|
787
|
+
end
|
|
788
|
+
return 0
|
|
789
|
+
else
|
|
790
|
+
return -1
|
|
791
|
+
end
|
|
792
|
+
`;
|
|
793
|
+
exports.moveToFinished = {
|
|
794
|
+
name: 'moveToFinished',
|
|
795
|
+
content,
|
|
796
|
+
keys: 14,
|
|
797
|
+
};
|
|
798
|
+
//# sourceMappingURL=moveToFinished-14.js.map
|