bullmq 4.17.0 → 5.1.0

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.
Files changed (200) hide show
  1. package/dist/cjs/classes/flow-producer.js +3 -10
  2. package/dist/cjs/classes/flow-producer.js.map +1 -1
  3. package/dist/cjs/classes/job.js +21 -11
  4. package/dist/cjs/classes/job.js.map +1 -1
  5. package/dist/cjs/classes/queue-base.js +2 -9
  6. package/dist/cjs/classes/queue-base.js.map +1 -1
  7. package/dist/cjs/classes/queue-events.js +3 -1
  8. package/dist/cjs/classes/queue-events.js.map +1 -1
  9. package/dist/cjs/classes/queue-keys.js +1 -0
  10. package/dist/cjs/classes/queue-keys.js.map +1 -1
  11. package/dist/cjs/classes/queue.js +1 -1
  12. package/dist/cjs/classes/redis-connection.js +9 -7
  13. package/dist/cjs/classes/redis-connection.js.map +1 -1
  14. package/dist/cjs/classes/repeat.js +22 -5
  15. package/dist/cjs/classes/repeat.js.map +1 -1
  16. package/dist/cjs/classes/scripts.js +34 -34
  17. package/dist/cjs/classes/scripts.js.map +1 -1
  18. package/dist/cjs/classes/worker.js +27 -32
  19. package/dist/cjs/classes/worker.js.map +1 -1
  20. package/dist/cjs/commands/{addDelayedJob-7.lua → addDelayedJob-6.lua} +18 -22
  21. package/dist/cjs/commands/addParentJob-4.lua +0 -2
  22. package/dist/{esm/commands/addPrioritizedJob-8.lua → cjs/commands/addPrioritizedJob-7.lua} +18 -24
  23. package/dist/cjs/commands/{addStandardJob-6.lua → addStandardJob-7.lua} +6 -2
  24. package/dist/cjs/commands/changePriority-6.lua +57 -0
  25. package/dist/cjs/commands/getCounts-1.lua +1 -0
  26. package/dist/cjs/commands/getRanges-1.lua +1 -0
  27. package/dist/cjs/commands/includes/addDelayMarkerIfNeeded.lua +5 -19
  28. package/dist/cjs/commands/includes/addJobWithPriority.lua +3 -7
  29. package/dist/cjs/commands/includes/checkStalledJobs.lua +1 -1
  30. package/dist/cjs/commands/includes/isQueuePaused.lua +7 -0
  31. package/dist/cjs/commands/includes/moveParentToWaitIfNeeded.lua +39 -30
  32. package/dist/cjs/commands/includes/prepareJobForProcessing.lua +1 -1
  33. package/dist/cjs/commands/includes/promoteDelayedJobs.lua +7 -4
  34. package/dist/{esm/commands/moveToActive-10.lua → cjs/commands/moveToActive-11.lua} +18 -29
  35. package/dist/cjs/commands/moveToDelayed-7.lua +77 -0
  36. package/dist/cjs/commands/{moveToFinished-13.lua → moveToFinished-14.lua} +29 -22
  37. package/dist/cjs/commands/moveToWaitingChildren-4.lua +7 -4
  38. package/dist/cjs/commands/pause-7.lua +41 -0
  39. package/dist/cjs/commands/promote-8.lua +60 -0
  40. package/dist/cjs/commands/{retryJob-9.lua → retryJob-10.lua} +16 -11
  41. package/dist/cjs/scripts/{addDelayedJob-7.js → addDelayedJob-6.js} +77 -88
  42. package/dist/cjs/scripts/{moveToActive-10.js.map → addDelayedJob-6.js.map} +1 -1
  43. package/dist/cjs/scripts/addParentJob-4.js +51 -61
  44. package/dist/cjs/scripts/addParentJob-4.js.map +1 -1
  45. package/dist/cjs/scripts/{addPrioritizedJob-8.js → addPrioritizedJob-7.js} +80 -93
  46. package/dist/cjs/scripts/addPrioritizedJob-7.js.map +1 -0
  47. package/dist/cjs/scripts/{addStandardJob-6.js → addStandardJob-7.js} +58 -63
  48. package/dist/cjs/scripts/addStandardJob-7.js.map +1 -0
  49. package/dist/cjs/scripts/changePriority-6.js +85 -0
  50. package/dist/cjs/scripts/changePriority-6.js.map +1 -0
  51. package/dist/cjs/scripts/getCounts-1.js +1 -0
  52. package/dist/cjs/scripts/getCounts-1.js.map +1 -1
  53. package/dist/cjs/scripts/getRanges-1.js +1 -0
  54. package/dist/cjs/scripts/getRanges-1.js.map +1 -1
  55. package/dist/cjs/scripts/index.js +10 -10
  56. package/dist/cjs/scripts/index.js.map +1 -1
  57. package/dist/cjs/scripts/moveStalledJobsToWait-8.js +1 -0
  58. package/dist/cjs/scripts/moveStalledJobsToWait-8.js.map +1 -1
  59. package/dist/cjs/scripts/{moveToActive-10.js → moveToActive-11.js} +30 -48
  60. package/dist/cjs/scripts/moveToActive-11.js.map +1 -0
  61. package/dist/cjs/scripts/moveToDelayed-7.js +103 -0
  62. package/dist/cjs/scripts/moveToDelayed-7.js.map +1 -0
  63. package/dist/cjs/scripts/{moveToFinished-13.js → moveToFinished-14.js} +89 -88
  64. package/dist/cjs/scripts/{moveToFinished-13.js.map → moveToFinished-14.js.map} +1 -1
  65. package/dist/cjs/scripts/moveToWaitingChildren-4.js +6 -3
  66. package/dist/cjs/scripts/moveToWaitingChildren-4.js.map +1 -1
  67. package/dist/cjs/scripts/pause-7.js +67 -0
  68. package/dist/cjs/scripts/pause-7.js.map +1 -0
  69. package/dist/cjs/scripts/promote-8.js +79 -0
  70. package/dist/cjs/scripts/promote-8.js.map +1 -0
  71. package/dist/cjs/scripts/{retryJob-9.js → retryJob-10.js} +26 -32
  72. package/dist/cjs/scripts/retryJob-10.js.map +1 -0
  73. package/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
  74. package/dist/esm/classes/flow-producer.js +3 -10
  75. package/dist/esm/classes/flow-producer.js.map +1 -1
  76. package/dist/esm/classes/job.d.ts +5 -0
  77. package/dist/esm/classes/job.js +21 -11
  78. package/dist/esm/classes/job.js.map +1 -1
  79. package/dist/esm/classes/queue-base.js +2 -9
  80. package/dist/esm/classes/queue-base.js.map +1 -1
  81. package/dist/esm/classes/queue-events.js +3 -1
  82. package/dist/esm/classes/queue-events.js.map +1 -1
  83. package/dist/esm/classes/queue-keys.js +1 -0
  84. package/dist/esm/classes/queue-keys.js.map +1 -1
  85. package/dist/esm/classes/queue.d.ts +1 -1
  86. package/dist/esm/classes/queue.js +1 -1
  87. package/dist/esm/classes/redis-connection.js +9 -7
  88. package/dist/esm/classes/redis-connection.js.map +1 -1
  89. package/dist/esm/classes/repeat.js +22 -5
  90. package/dist/esm/classes/repeat.js.map +1 -1
  91. package/dist/esm/classes/scripts.d.ts +4 -4
  92. package/dist/esm/classes/scripts.js +34 -34
  93. package/dist/esm/classes/scripts.js.map +1 -1
  94. package/dist/esm/classes/worker.d.ts +1 -1
  95. package/dist/esm/classes/worker.js +27 -32
  96. package/dist/esm/classes/worker.js.map +1 -1
  97. package/dist/esm/commands/{addDelayedJob-7.lua → addDelayedJob-6.lua} +18 -22
  98. package/dist/esm/commands/addParentJob-4.lua +0 -2
  99. package/dist/{cjs/commands/addPrioritizedJob-8.lua → esm/commands/addPrioritizedJob-7.lua} +18 -24
  100. package/dist/esm/commands/{addStandardJob-6.lua → addStandardJob-7.lua} +6 -2
  101. package/dist/esm/commands/changePriority-6.lua +57 -0
  102. package/dist/esm/commands/getCounts-1.lua +1 -0
  103. package/dist/esm/commands/getRanges-1.lua +1 -0
  104. package/dist/esm/commands/includes/addDelayMarkerIfNeeded.lua +5 -19
  105. package/dist/esm/commands/includes/addJobWithPriority.lua +3 -7
  106. package/dist/esm/commands/includes/checkStalledJobs.lua +1 -1
  107. package/dist/esm/commands/includes/isQueuePaused.lua +7 -0
  108. package/dist/esm/commands/includes/moveParentToWaitIfNeeded.lua +39 -30
  109. package/dist/esm/commands/includes/prepareJobForProcessing.lua +1 -1
  110. package/dist/esm/commands/includes/promoteDelayedJobs.lua +7 -4
  111. package/dist/{cjs/commands/moveToActive-10.lua → esm/commands/moveToActive-11.lua} +18 -29
  112. package/dist/esm/commands/moveToDelayed-7.lua +77 -0
  113. package/dist/esm/commands/{moveToFinished-13.lua → moveToFinished-14.lua} +29 -22
  114. package/dist/esm/commands/moveToWaitingChildren-4.lua +7 -4
  115. package/dist/esm/commands/pause-7.lua +41 -0
  116. package/dist/esm/commands/promote-8.lua +60 -0
  117. package/dist/esm/commands/{retryJob-9.lua → retryJob-10.lua} +16 -11
  118. package/dist/esm/interfaces/job-json.d.ts +4 -1
  119. package/dist/esm/interfaces/minimal-job.d.ts +3 -0
  120. package/dist/esm/interfaces/queue-options.d.ts +1 -1
  121. package/dist/esm/interfaces/repeat-options.d.ts +7 -0
  122. package/dist/esm/scripts/{addDelayedJob-7.js → addDelayedJob-6.js} +77 -88
  123. package/dist/esm/scripts/{moveToActive-10.js.map → addDelayedJob-6.js.map} +1 -1
  124. package/dist/esm/scripts/addParentJob-4.js +51 -61
  125. package/dist/esm/scripts/addParentJob-4.js.map +1 -1
  126. package/dist/esm/scripts/{addPrioritizedJob-8.js → addPrioritizedJob-7.js} +80 -93
  127. package/dist/esm/scripts/addPrioritizedJob-7.js.map +1 -0
  128. package/dist/esm/scripts/{addStandardJob-6.js → addStandardJob-7.js} +58 -63
  129. package/dist/esm/scripts/addStandardJob-7.js.map +1 -0
  130. package/dist/esm/scripts/changePriority-6.js +82 -0
  131. package/dist/esm/scripts/changePriority-6.js.map +1 -0
  132. package/dist/esm/scripts/getCounts-1.js +1 -0
  133. package/dist/esm/scripts/getCounts-1.js.map +1 -1
  134. package/dist/esm/scripts/getRanges-1.js +1 -0
  135. package/dist/esm/scripts/getRanges-1.js.map +1 -1
  136. package/dist/esm/scripts/index.d.ts +10 -10
  137. package/dist/esm/scripts/index.js +10 -10
  138. package/dist/esm/scripts/index.js.map +1 -1
  139. package/dist/esm/scripts/moveStalledJobsToWait-8.js +1 -0
  140. package/dist/esm/scripts/moveStalledJobsToWait-8.js.map +1 -1
  141. package/dist/esm/scripts/{moveToActive-10.js → moveToActive-11.js} +30 -48
  142. package/dist/esm/scripts/moveToActive-11.js.map +1 -0
  143. package/dist/esm/scripts/moveToDelayed-7.js +100 -0
  144. package/dist/esm/scripts/moveToDelayed-7.js.map +1 -0
  145. package/dist/esm/scripts/{moveToFinished-13.js → moveToFinished-14.js} +89 -88
  146. package/dist/esm/scripts/{moveToFinished-13.js.map → moveToFinished-14.js.map} +1 -1
  147. package/dist/esm/scripts/moveToWaitingChildren-4.js +6 -3
  148. package/dist/esm/scripts/moveToWaitingChildren-4.js.map +1 -1
  149. package/dist/esm/scripts/pause-7.js +64 -0
  150. package/dist/esm/scripts/pause-7.js.map +1 -0
  151. package/dist/esm/scripts/promote-8.js +76 -0
  152. package/dist/esm/scripts/promote-8.js.map +1 -0
  153. package/dist/esm/scripts/{retryJob-9.js → retryJob-10.js} +26 -32
  154. package/dist/esm/scripts/retryJob-10.js.map +1 -0
  155. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  156. package/package.json +2 -1
  157. package/dist/cjs/commands/changePriority-5.lua +0 -52
  158. package/dist/cjs/commands/includes/addPriorityMarkerIfNeeded.lua +0 -12
  159. package/dist/cjs/commands/moveToDelayed-8.lua +0 -72
  160. package/dist/cjs/commands/pause-5.lua +0 -36
  161. package/dist/cjs/commands/promote-7.lua +0 -57
  162. package/dist/cjs/scripts/addDelayedJob-7.js.map +0 -1
  163. package/dist/cjs/scripts/addPrioritizedJob-8.js.map +0 -1
  164. package/dist/cjs/scripts/addStandardJob-6.js.map +0 -1
  165. package/dist/cjs/scripts/changePriority-5.js +0 -87
  166. package/dist/cjs/scripts/changePriority-5.js.map +0 -1
  167. package/dist/cjs/scripts/moveToDelayed-8.js +0 -168
  168. package/dist/cjs/scripts/moveToDelayed-8.js.map +0 -1
  169. package/dist/cjs/scripts/pause-5.js +0 -48
  170. package/dist/cjs/scripts/pause-5.js.map +0 -1
  171. package/dist/cjs/scripts/promote-7.js +0 -87
  172. package/dist/cjs/scripts/promote-7.js.map +0 -1
  173. package/dist/cjs/scripts/retryJob-9.js.map +0 -1
  174. package/dist/esm/commands/changePriority-5.lua +0 -52
  175. package/dist/esm/commands/includes/addPriorityMarkerIfNeeded.lua +0 -12
  176. package/dist/esm/commands/moveToDelayed-8.lua +0 -72
  177. package/dist/esm/commands/pause-5.lua +0 -36
  178. package/dist/esm/commands/promote-7.lua +0 -57
  179. package/dist/esm/scripts/addDelayedJob-7.js.map +0 -1
  180. package/dist/esm/scripts/addPrioritizedJob-8.js.map +0 -1
  181. package/dist/esm/scripts/addStandardJob-6.js.map +0 -1
  182. package/dist/esm/scripts/changePriority-5.js +0 -84
  183. package/dist/esm/scripts/changePriority-5.js.map +0 -1
  184. package/dist/esm/scripts/moveToDelayed-8.js +0 -165
  185. package/dist/esm/scripts/moveToDelayed-8.js.map +0 -1
  186. package/dist/esm/scripts/pause-5.js +0 -45
  187. package/dist/esm/scripts/pause-5.js.map +0 -1
  188. package/dist/esm/scripts/promote-7.js +0 -84
  189. package/dist/esm/scripts/promote-7.js.map +0 -1
  190. package/dist/esm/scripts/retryJob-9.js.map +0 -1
  191. /package/dist/esm/scripts/{addDelayedJob-7.d.ts → addDelayedJob-6.d.ts} +0 -0
  192. /package/dist/esm/scripts/{addPrioritizedJob-8.d.ts → addPrioritizedJob-7.d.ts} +0 -0
  193. /package/dist/esm/scripts/{addStandardJob-6.d.ts → addStandardJob-7.d.ts} +0 -0
  194. /package/dist/esm/scripts/{changePriority-5.d.ts → changePriority-6.d.ts} +0 -0
  195. /package/dist/esm/scripts/{moveToActive-10.d.ts → moveToActive-11.d.ts} +0 -0
  196. /package/dist/esm/scripts/{moveToDelayed-8.d.ts → moveToDelayed-7.d.ts} +0 -0
  197. /package/dist/esm/scripts/{moveToFinished-13.d.ts → moveToFinished-14.d.ts} +0 -0
  198. /package/dist/esm/scripts/{pause-5.d.ts → pause-7.d.ts} +0 -0
  199. /package/dist/esm/scripts/{promote-7.d.ts → promote-8.d.ts} +0 -0
  200. /package/dist/esm/scripts/{retryJob-9.d.ts → retryJob-10.d.ts} +0 -0
@@ -77,7 +77,7 @@ end
77
77
  -- Includes
78
78
  --[[
79
79
  Add delay marker if needed.
80
- ]]
80
+ ]]
81
81
  -- Includes
82
82
  --[[
83
83
  Function to return the next delayed job timestamp.
@@ -92,47 +92,30 @@ local function getNextDelayedTimestamp(delayedKey)
92
92
  return nextTimestamp
93
93
  end
94
94
  end
95
- local function addDelayMarkerIfNeeded(targetKey, delayedKey)
96
- local waitLen = rcall("LLEN", targetKey)
97
- if waitLen <= 1 then
95
+ local function addDelayMarkerIfNeeded(markerKey, delayedKey)
98
96
  local nextTimestamp = getNextDelayedTimestamp(delayedKey)
99
97
  if nextTimestamp ~= nil then
100
- -- Check if there is already a marker with older timestamp
101
- -- if there is, we need to replace it.
102
- if waitLen == 1 then
103
- local marker = rcall("LINDEX", targetKey, 0)
104
- local oldTimestamp = tonumber(marker:sub(3))
105
- if oldTimestamp and oldTimestamp > nextTimestamp then
106
- rcall("LSET", targetKey, 0, "0:" .. nextTimestamp)
107
- end
108
- else
109
- -- if there is no marker, then we need to add one
110
- rcall("LPUSH", targetKey, "0:" .. nextTimestamp)
111
- end
98
+ -- Replace the score of the marker with the newest known
99
+ -- next timestamp.
100
+ rcall("ZADD", markerKey, nextTimestamp, "0")
112
101
  end
113
- end
114
102
  end
115
103
  --[[
116
- Function to add job considering priority.
104
+ Function to check for the meta.paused key to decide if we are paused or not
105
+ (since an empty list and !EXISTS are not really the same).
117
106
  ]]
118
- -- Includes
107
+ local function isQueuePaused(queueMetaKey)
108
+ return rcall("HEXISTS", queueMetaKey, "paused") == 1
109
+ end
119
110
  --[[
120
- Function priority marker to wait if needed
121
- in order to wake up our workers and to respect priority
122
- order as much as possible
111
+ Function to add job considering priority.
123
112
  ]]
124
- local function addPriorityMarkerIfNeeded(waitKey)
125
- local waitLen = rcall("LLEN", waitKey)
126
- if waitLen == 0 then
127
- rcall("LPUSH", waitKey, "0:0")
128
- end
129
- end
130
- local function addJobWithPriority(waitKey, prioritizedKey, priority, paused, jobId, priorityCounterKey)
113
+ local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, isPaused)
131
114
  local prioCounter = rcall("INCR", priorityCounterKey)
132
115
  local score = priority * 0x100000000 + bit.band(prioCounter, 0xffffffffffff)
133
116
  rcall("ZADD", prioritizedKey, score, jobId)
134
- if not paused then
135
- addPriorityMarkerIfNeeded(waitKey)
117
+ if not isPaused then
118
+ rcall("ZADD", markerKey, 0, "0")
136
119
  end
137
120
  end
138
121
  --[[
@@ -146,35 +129,44 @@ local function getTargetQueueList(queueMetaKey, waitKey, pausedKey)
146
129
  return pausedKey, true
147
130
  end
148
131
  end
149
- local function moveParentToWaitIfNeeded(parentQueueKey, parentDependenciesKey, parentKey, parentId, timestamp)
150
- local isParentActive = rcall("ZSCORE", parentQueueKey .. ":waiting-children", parentId)
151
- if rcall("SCARD", parentDependenciesKey) == 0 and isParentActive then
152
- rcall("ZREM", parentQueueKey .. ":waiting-children", parentId)
153
- local parentWaitKey = parentQueueKey .. ":wait"
154
- local parentTarget, paused = getTargetQueueList(parentQueueKey .. ":meta", parentWaitKey,
155
- parentQueueKey .. ":paused")
156
- local jobAttributes = rcall("HMGET", parentKey, "priority", "delay")
157
- local priority = tonumber(jobAttributes[1]) or 0
158
- local delay = tonumber(jobAttributes[2]) or 0
159
- if delay > 0 then
160
- local delayedTimestamp = tonumber(timestamp) + delay
161
- local score = delayedTimestamp * 0x1000
162
- local parentDelayedKey = parentQueueKey .. ":delayed"
163
- rcall("ZADD", parentDelayedKey, score, parentId)
164
- rcall("XADD", parentQueueKey .. ":events", "*", "event", "delayed", "jobId", parentId,
165
- "delay", delayedTimestamp)
166
- addDelayMarkerIfNeeded(parentTarget, parentDelayedKey)
167
- else
168
- if priority == 0 then
169
- rcall("RPUSH", parentTarget, parentId)
170
- else
171
- addJobWithPriority(parentWaitKey, parentQueueKey .. ":prioritized", priority, paused,
172
- parentId, parentQueueKey .. ":pc")
173
- end
174
- rcall("XADD", parentQueueKey .. ":events", "*", "event", "waiting", "jobId", parentId,
175
- "prev", "waiting-children")
132
+ local function moveParentToWaitIfNeeded(parentQueueKey, parentDependenciesKey,
133
+ parentKey, parentId, timestamp)
134
+ local isParentActive = rcall("ZSCORE",
135
+ parentQueueKey .. ":waiting-children", parentId)
136
+ if rcall("SCARD", parentDependenciesKey) == 0 and isParentActive then
137
+ rcall("ZREM", parentQueueKey .. ":waiting-children", parentId)
138
+ local parentWaitKey = parentQueueKey .. ":wait"
139
+ local parentPausedKey = parentQueueKey .. ":paused"
140
+ local parentMetaKey = parentQueueKey .. ":meta"
141
+ local parentMarkerKey = parentQueueKey .. ":marker"
142
+ local jobAttributes = rcall("HMGET", parentKey, "priority", "delay")
143
+ local priority = tonumber(jobAttributes[1]) or 0
144
+ local delay = tonumber(jobAttributes[2]) or 0
145
+ if delay > 0 then
146
+ local delayedTimestamp = tonumber(timestamp) + delay
147
+ local score = delayedTimestamp * 0x1000
148
+ local parentDelayedKey = parentQueueKey .. ":delayed"
149
+ rcall("ZADD", parentDelayedKey, score, parentId)
150
+ rcall("XADD", parentQueueKey .. ":events", "*", "event", "delayed",
151
+ "jobId", parentId, "delay", delayedTimestamp)
152
+ addDelayMarkerIfNeeded(parentMarkerKey, parentDelayedKey)
153
+ else
154
+ if priority == 0 then
155
+ local parentTarget, _paused =
156
+ getTargetQueueList(parentMetaKey, parentWaitKey,
157
+ parentPausedKey)
158
+ rcall("RPUSH", parentTarget, parentId)
159
+ rcall("ZADD", parentMarkerKey, 0, "0")
160
+ else
161
+ local isPaused = isQueuePaused(parentMetaKey)
162
+ addJobWithPriority(parentMarkerKey,
163
+ parentQueueKey .. ":prioritized", priority,
164
+ parentId, parentQueueKey .. ":pc", isPaused)
165
+ end
166
+ rcall("XADD", parentQueueKey .. ":events", "*", "event", "waiting",
167
+ "jobId", parentId, "prev", "waiting-children")
168
+ end
176
169
  end
177
- end
178
170
  end
179
171
  local function updateParentDepsIfNeeded(parentKey, parentQueueKey, parentDependenciesKey,
180
172
  parentId, jobIdKey, returnvalue, timestamp )
@@ -244,8 +236,6 @@ rcall("ZADD", waitChildrenKey, timestamp, jobId)
244
236
  rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event",
245
237
  "waiting-children", "jobId", jobId)
246
238
  -- Check if this job is a child of another job, if so add it to the parents dependencies
247
- -- TODO: Should not be possible to add a child job to a parent that is not in the "waiting-children" status.
248
- -- fail in this case.
249
239
  if parentDependenciesKey ~= nil then
250
240
  rcall("SADD", parentDependenciesKey, jobIdKey)
251
241
  end
@@ -1 +1 @@
1
- {"version":3,"file":"addParentJob-4.js","sourceRoot":"","sources":["../../../src/scripts/addParentJob-4.ts"],"names":[],"mappings":";;;AAAA,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyPf,CAAC;AACW,QAAA,YAAY,GAAG;IAC1B,IAAI,EAAE,cAAc;IACpB,OAAO;IACP,IAAI,EAAE,CAAC;CACR,CAAC"}
1
+ {"version":3,"file":"addParentJob-4.js","sourceRoot":"","sources":["../../../src/scripts/addParentJob-4.ts"],"names":[],"mappings":";;;AAAA,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+Of,CAAC;AACW,QAAA,YAAY,GAAG;IAC1B,IAAI,EAAE,cAAc;IACpB,OAAO;IACP,IAAI,EAAE,CAAC;CACR,CAAC"}
@@ -7,14 +7,13 @@ const content = `--[[
7
7
  - Creates a new job key with the job data.
8
8
  - Adds the job to the "added" list so that workers gets notified.
9
9
  Input:
10
- KEYS[1] 'wait',
11
- KEYS[2] 'paused'
12
- KEYS[3] 'meta'
13
- KEYS[4] 'id'
14
- KEYS[5] 'prioritized'
15
- KEYS[6] 'completed'
16
- KEYS[7] events stream key
17
- KEYS[8] 'pc' priority counter
10
+ KEYS[1] 'marker',
11
+ KEYS[2] 'meta'
12
+ KEYS[3] 'id'
13
+ KEYS[4] 'prioritized'
14
+ KEYS[5] 'completed'
15
+ KEYS[6] events stream key
16
+ KEYS[7] 'pc' priority counter
18
17
  ARGV[1] msgpacked arguments array
19
18
  [1] key prefix,
20
19
  [2] custom id (will not generate one automatically)
@@ -30,15 +29,13 @@ const content = `--[[
30
29
  Output:
31
30
  jobId - OK
32
31
  -5 - Missing parent key
33
- ]]
34
- local waitKey = KEYS[1]
35
- local pausedKey = KEYS[2]
36
- local metaKey = KEYS[3]
37
- local idKey = KEYS[4]
38
- local priorityKey = KEYS[5]
39
- local completedKey = KEYS[6]
40
- local eventsKey = KEYS[7]
41
- local priorityCounterKey = KEYS[8]
32
+ ]]
33
+ local metaKey = KEYS[2]
34
+ local idKey = KEYS[3]
35
+ local priorityKey = KEYS[4]
36
+ local completedKey = KEYS[5]
37
+ local eventsKey = KEYS[6]
38
+ local priorityCounterKey = KEYS[7]
42
39
  local jobId
43
40
  local jobIdKey
44
41
  local rcall = redis.call
@@ -76,37 +73,21 @@ local function storeJob(eventsKey, jobIdKey, jobId, name, data, opts, timestamp,
76
73
  return delay, priority
77
74
  end
78
75
  --[[
79
- Function to add job considering priority.
76
+ Function to check for the meta.paused key to decide if we are paused or not
77
+ (since an empty list and !EXISTS are not really the same).
80
78
  ]]
81
- -- Includes
79
+ local function isQueuePaused(queueMetaKey)
80
+ return rcall("HEXISTS", queueMetaKey, "paused") == 1
81
+ end
82
82
  --[[
83
- Function priority marker to wait if needed
84
- in order to wake up our workers and to respect priority
85
- order as much as possible
83
+ Function to add job considering priority.
86
84
  ]]
87
- local function addPriorityMarkerIfNeeded(waitKey)
88
- local waitLen = rcall("LLEN", waitKey)
89
- if waitLen == 0 then
90
- rcall("LPUSH", waitKey, "0:0")
91
- end
92
- end
93
- local function addJobWithPriority(waitKey, prioritizedKey, priority, paused, jobId, priorityCounterKey)
85
+ local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, isPaused)
94
86
  local prioCounter = rcall("INCR", priorityCounterKey)
95
87
  local score = priority * 0x100000000 + bit.band(prioCounter, 0xffffffffffff)
96
88
  rcall("ZADD", prioritizedKey, score, jobId)
97
- if not paused then
98
- addPriorityMarkerIfNeeded(waitKey)
99
- end
100
- end
101
- --[[
102
- Function to check for the meta.paused key to decide if we are paused or not
103
- (since an empty list and !EXISTS are not really the same).
104
- ]]
105
- local function getTargetQueueList(queueMetaKey, waitKey, pausedKey)
106
- if rcall("HEXISTS", queueMetaKey, "paused") ~= 1 then
107
- return waitKey, false
108
- else
109
- return pausedKey, true
89
+ if not isPaused then
90
+ rcall("ZADD", markerKey, 0, "0")
110
91
  end
111
92
  end
112
93
  --[[
@@ -119,7 +100,7 @@ end
119
100
  -- Includes
120
101
  --[[
121
102
  Add delay marker if needed.
122
- ]]
103
+ ]]
123
104
  -- Includes
124
105
  --[[
125
106
  Function to return the next delayed job timestamp.
@@ -134,55 +115,63 @@ local function getNextDelayedTimestamp(delayedKey)
134
115
  return nextTimestamp
135
116
  end
136
117
  end
137
- local function addDelayMarkerIfNeeded(targetKey, delayedKey)
138
- local waitLen = rcall("LLEN", targetKey)
139
- if waitLen <= 1 then
118
+ local function addDelayMarkerIfNeeded(markerKey, delayedKey)
140
119
  local nextTimestamp = getNextDelayedTimestamp(delayedKey)
141
120
  if nextTimestamp ~= nil then
142
- -- Check if there is already a marker with older timestamp
143
- -- if there is, we need to replace it.
144
- if waitLen == 1 then
145
- local marker = rcall("LINDEX", targetKey, 0)
146
- local oldTimestamp = tonumber(marker:sub(3))
147
- if oldTimestamp and oldTimestamp > nextTimestamp then
148
- rcall("LSET", targetKey, 0, "0:" .. nextTimestamp)
149
- end
150
- else
151
- -- if there is no marker, then we need to add one
152
- rcall("LPUSH", targetKey, "0:" .. nextTimestamp)
153
- end
121
+ -- Replace the score of the marker with the newest known
122
+ -- next timestamp.
123
+ rcall("ZADD", markerKey, nextTimestamp, "0")
154
124
  end
125
+ end
126
+ --[[
127
+ Function to check for the meta.paused key to decide if we are paused or not
128
+ (since an empty list and !EXISTS are not really the same).
129
+ ]]
130
+ local function getTargetQueueList(queueMetaKey, waitKey, pausedKey)
131
+ if rcall("HEXISTS", queueMetaKey, "paused") ~= 1 then
132
+ return waitKey, false
133
+ else
134
+ return pausedKey, true
155
135
  end
156
136
  end
157
- local function moveParentToWaitIfNeeded(parentQueueKey, parentDependenciesKey, parentKey, parentId, timestamp)
158
- local isParentActive = rcall("ZSCORE", parentQueueKey .. ":waiting-children", parentId)
159
- if rcall("SCARD", parentDependenciesKey) == 0 and isParentActive then
160
- rcall("ZREM", parentQueueKey .. ":waiting-children", parentId)
161
- local parentWaitKey = parentQueueKey .. ":wait"
162
- local parentTarget, paused = getTargetQueueList(parentQueueKey .. ":meta", parentWaitKey,
163
- parentQueueKey .. ":paused")
164
- local jobAttributes = rcall("HMGET", parentKey, "priority", "delay")
165
- local priority = tonumber(jobAttributes[1]) or 0
166
- local delay = tonumber(jobAttributes[2]) or 0
167
- if delay > 0 then
168
- local delayedTimestamp = tonumber(timestamp) + delay
169
- local score = delayedTimestamp * 0x1000
170
- local parentDelayedKey = parentQueueKey .. ":delayed"
171
- rcall("ZADD", parentDelayedKey, score, parentId)
172
- rcall("XADD", parentQueueKey .. ":events", "*", "event", "delayed", "jobId", parentId,
173
- "delay", delayedTimestamp)
174
- addDelayMarkerIfNeeded(parentTarget, parentDelayedKey)
175
- else
176
- if priority == 0 then
177
- rcall("RPUSH", parentTarget, parentId)
178
- else
179
- addJobWithPriority(parentWaitKey, parentQueueKey .. ":prioritized", priority, paused,
180
- parentId, parentQueueKey .. ":pc")
181
- end
182
- rcall("XADD", parentQueueKey .. ":events", "*", "event", "waiting", "jobId", parentId,
183
- "prev", "waiting-children")
137
+ local function moveParentToWaitIfNeeded(parentQueueKey, parentDependenciesKey,
138
+ parentKey, parentId, timestamp)
139
+ local isParentActive = rcall("ZSCORE",
140
+ parentQueueKey .. ":waiting-children", parentId)
141
+ if rcall("SCARD", parentDependenciesKey) == 0 and isParentActive then
142
+ rcall("ZREM", parentQueueKey .. ":waiting-children", parentId)
143
+ local parentWaitKey = parentQueueKey .. ":wait"
144
+ local parentPausedKey = parentQueueKey .. ":paused"
145
+ local parentMetaKey = parentQueueKey .. ":meta"
146
+ local parentMarkerKey = parentQueueKey .. ":marker"
147
+ local jobAttributes = rcall("HMGET", parentKey, "priority", "delay")
148
+ local priority = tonumber(jobAttributes[1]) or 0
149
+ local delay = tonumber(jobAttributes[2]) or 0
150
+ if delay > 0 then
151
+ local delayedTimestamp = tonumber(timestamp) + delay
152
+ local score = delayedTimestamp * 0x1000
153
+ local parentDelayedKey = parentQueueKey .. ":delayed"
154
+ rcall("ZADD", parentDelayedKey, score, parentId)
155
+ rcall("XADD", parentQueueKey .. ":events", "*", "event", "delayed",
156
+ "jobId", parentId, "delay", delayedTimestamp)
157
+ addDelayMarkerIfNeeded(parentMarkerKey, parentDelayedKey)
158
+ else
159
+ if priority == 0 then
160
+ local parentTarget, _paused =
161
+ getTargetQueueList(parentMetaKey, parentWaitKey,
162
+ parentPausedKey)
163
+ rcall("RPUSH", parentTarget, parentId)
164
+ rcall("ZADD", parentMarkerKey, 0, "0")
165
+ else
166
+ local isPaused = isQueuePaused(parentMetaKey)
167
+ addJobWithPriority(parentMarkerKey,
168
+ parentQueueKey .. ":prioritized", priority,
169
+ parentId, parentQueueKey .. ":pc", isPaused)
170
+ end
171
+ rcall("XADD", parentQueueKey .. ":events", "*", "event", "waiting",
172
+ "jobId", parentId, "prev", "waiting-children")
173
+ end
184
174
  end
185
- end
186
175
  end
187
176
  local function updateParentDepsIfNeeded(parentKey, parentQueueKey, parentDependenciesKey,
188
177
  parentId, jobIdKey, returnvalue, timestamp )
@@ -248,15 +237,13 @@ end
248
237
  local delay, priority = storeJob(eventsKey, jobIdKey, jobId, args[3], ARGV[2],
249
238
  opts, timestamp, parentKey, parentData,
250
239
  repeatJobKey)
251
- local target, paused = getTargetQueueList(metaKey, waitKey, pausedKey)
252
- addJobWithPriority(waitKey, priorityKey, priority, paused, jobId,
253
- priorityCounterKey)
240
+ -- Add the job to the prioritized set
241
+ local isPause = isQueuePaused(metaKey)
242
+ addJobWithPriority( KEYS[1], priorityKey, priority, jobId, priorityCounterKey, isPause)
254
243
  -- Emit waiting event
255
244
  rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "waiting",
256
245
  "jobId", jobId)
257
246
  -- Check if this job is a child of another job, if so add it to the parents dependencies
258
- -- TODO: Should not be possible to add a child job to a parent that is not in the "waiting-children" status.
259
- -- fail in this case.
260
247
  if parentDependenciesKey ~= nil then
261
248
  rcall("SADD", parentDependenciesKey, jobIdKey)
262
249
  end
@@ -265,6 +252,6 @@ return jobId .. "" -- convert to string
265
252
  exports.addPrioritizedJob = {
266
253
  name: 'addPrioritizedJob',
267
254
  content,
268
- keys: 8,
255
+ keys: 7,
269
256
  };
270
- //# sourceMappingURL=addPrioritizedJob-8.js.map
257
+ //# sourceMappingURL=addPrioritizedJob-7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addPrioritizedJob-7.js","sourceRoot":"","sources":["../../../src/scripts/addPrioritizedJob-7.ts"],"names":[],"mappings":";;;AAAA,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuPf,CAAC;AACW,QAAA,iBAAiB,GAAG;IAC/B,IAAI,EAAE,mBAAmB;IACzB,OAAO;IACP,IAAI,EAAE,CAAC;CACR,CAAC"}
@@ -22,6 +22,7 @@ const content = `--[[
22
22
  KEYS[4] 'id'
23
23
  KEYS[5] 'completed'
24
24
  KEYS[6] events stream key
25
+ KEYS[7] marker key
25
26
  ARGV[1] msgpacked arguments array
26
27
  [1] key prefix,
27
28
  [2] custom id (will not generate one automatically)
@@ -85,7 +86,7 @@ end
85
86
  -- Includes
86
87
  --[[
87
88
  Add delay marker if needed.
88
- ]]
89
+ ]]
89
90
  -- Includes
90
91
  --[[
91
92
  Function to return the next delayed job timestamp.
@@ -100,47 +101,30 @@ local function getNextDelayedTimestamp(delayedKey)
100
101
  return nextTimestamp
101
102
  end
102
103
  end
103
- local function addDelayMarkerIfNeeded(targetKey, delayedKey)
104
- local waitLen = rcall("LLEN", targetKey)
105
- if waitLen <= 1 then
104
+ local function addDelayMarkerIfNeeded(markerKey, delayedKey)
106
105
  local nextTimestamp = getNextDelayedTimestamp(delayedKey)
107
106
  if nextTimestamp ~= nil then
108
- -- Check if there is already a marker with older timestamp
109
- -- if there is, we need to replace it.
110
- if waitLen == 1 then
111
- local marker = rcall("LINDEX", targetKey, 0)
112
- local oldTimestamp = tonumber(marker:sub(3))
113
- if oldTimestamp and oldTimestamp > nextTimestamp then
114
- rcall("LSET", targetKey, 0, "0:" .. nextTimestamp)
115
- end
116
- else
117
- -- if there is no marker, then we need to add one
118
- rcall("LPUSH", targetKey, "0:" .. nextTimestamp)
119
- end
107
+ -- Replace the score of the marker with the newest known
108
+ -- next timestamp.
109
+ rcall("ZADD", markerKey, nextTimestamp, "0")
120
110
  end
121
- end
122
111
  end
123
112
  --[[
124
- Function to add job considering priority.
113
+ Function to check for the meta.paused key to decide if we are paused or not
114
+ (since an empty list and !EXISTS are not really the same).
125
115
  ]]
126
- -- Includes
116
+ local function isQueuePaused(queueMetaKey)
117
+ return rcall("HEXISTS", queueMetaKey, "paused") == 1
118
+ end
127
119
  --[[
128
- Function priority marker to wait if needed
129
- in order to wake up our workers and to respect priority
130
- order as much as possible
120
+ Function to add job considering priority.
131
121
  ]]
132
- local function addPriorityMarkerIfNeeded(waitKey)
133
- local waitLen = rcall("LLEN", waitKey)
134
- if waitLen == 0 then
135
- rcall("LPUSH", waitKey, "0:0")
136
- end
137
- end
138
- local function addJobWithPriority(waitKey, prioritizedKey, priority, paused, jobId, priorityCounterKey)
122
+ local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, isPaused)
139
123
  local prioCounter = rcall("INCR", priorityCounterKey)
140
124
  local score = priority * 0x100000000 + bit.band(prioCounter, 0xffffffffffff)
141
125
  rcall("ZADD", prioritizedKey, score, jobId)
142
- if not paused then
143
- addPriorityMarkerIfNeeded(waitKey)
126
+ if not isPaused then
127
+ rcall("ZADD", markerKey, 0, "0")
144
128
  end
145
129
  end
146
130
  --[[
@@ -154,35 +138,44 @@ local function getTargetQueueList(queueMetaKey, waitKey, pausedKey)
154
138
  return pausedKey, true
155
139
  end
156
140
  end
157
- local function moveParentToWaitIfNeeded(parentQueueKey, parentDependenciesKey, parentKey, parentId, timestamp)
158
- local isParentActive = rcall("ZSCORE", parentQueueKey .. ":waiting-children", parentId)
159
- if rcall("SCARD", parentDependenciesKey) == 0 and isParentActive then
160
- rcall("ZREM", parentQueueKey .. ":waiting-children", parentId)
161
- local parentWaitKey = parentQueueKey .. ":wait"
162
- local parentTarget, paused = getTargetQueueList(parentQueueKey .. ":meta", parentWaitKey,
163
- parentQueueKey .. ":paused")
164
- local jobAttributes = rcall("HMGET", parentKey, "priority", "delay")
165
- local priority = tonumber(jobAttributes[1]) or 0
166
- local delay = tonumber(jobAttributes[2]) or 0
167
- if delay > 0 then
168
- local delayedTimestamp = tonumber(timestamp) + delay
169
- local score = delayedTimestamp * 0x1000
170
- local parentDelayedKey = parentQueueKey .. ":delayed"
171
- rcall("ZADD", parentDelayedKey, score, parentId)
172
- rcall("XADD", parentQueueKey .. ":events", "*", "event", "delayed", "jobId", parentId,
173
- "delay", delayedTimestamp)
174
- addDelayMarkerIfNeeded(parentTarget, parentDelayedKey)
175
- else
176
- if priority == 0 then
177
- rcall("RPUSH", parentTarget, parentId)
178
- else
179
- addJobWithPriority(parentWaitKey, parentQueueKey .. ":prioritized", priority, paused,
180
- parentId, parentQueueKey .. ":pc")
181
- end
182
- rcall("XADD", parentQueueKey .. ":events", "*", "event", "waiting", "jobId", parentId,
183
- "prev", "waiting-children")
141
+ local function moveParentToWaitIfNeeded(parentQueueKey, parentDependenciesKey,
142
+ parentKey, parentId, timestamp)
143
+ local isParentActive = rcall("ZSCORE",
144
+ parentQueueKey .. ":waiting-children", parentId)
145
+ if rcall("SCARD", parentDependenciesKey) == 0 and isParentActive then
146
+ rcall("ZREM", parentQueueKey .. ":waiting-children", parentId)
147
+ local parentWaitKey = parentQueueKey .. ":wait"
148
+ local parentPausedKey = parentQueueKey .. ":paused"
149
+ local parentMetaKey = parentQueueKey .. ":meta"
150
+ local parentMarkerKey = parentQueueKey .. ":marker"
151
+ local jobAttributes = rcall("HMGET", parentKey, "priority", "delay")
152
+ local priority = tonumber(jobAttributes[1]) or 0
153
+ local delay = tonumber(jobAttributes[2]) or 0
154
+ if delay > 0 then
155
+ local delayedTimestamp = tonumber(timestamp) + delay
156
+ local score = delayedTimestamp * 0x1000
157
+ local parentDelayedKey = parentQueueKey .. ":delayed"
158
+ rcall("ZADD", parentDelayedKey, score, parentId)
159
+ rcall("XADD", parentQueueKey .. ":events", "*", "event", "delayed",
160
+ "jobId", parentId, "delay", delayedTimestamp)
161
+ addDelayMarkerIfNeeded(parentMarkerKey, parentDelayedKey)
162
+ else
163
+ if priority == 0 then
164
+ local parentTarget, _paused =
165
+ getTargetQueueList(parentMetaKey, parentWaitKey,
166
+ parentPausedKey)
167
+ rcall("RPUSH", parentTarget, parentId)
168
+ rcall("ZADD", parentMarkerKey, 0, "0")
169
+ else
170
+ local isPaused = isQueuePaused(parentMetaKey)
171
+ addJobWithPriority(parentMarkerKey,
172
+ parentQueueKey .. ":prioritized", priority,
173
+ parentId, parentQueueKey .. ":pc", isPaused)
174
+ end
175
+ rcall("XADD", parentQueueKey .. ":events", "*", "event", "waiting",
176
+ "jobId", parentId, "prev", "waiting-children")
177
+ end
184
178
  end
185
- end
186
179
  end
187
180
  local function updateParentDepsIfNeeded(parentKey, parentQueueKey, parentDependenciesKey,
188
181
  parentId, jobIdKey, returnvalue, timestamp )
@@ -249,6 +242,10 @@ end
249
242
  storeJob(eventsKey, jobIdKey, jobId, args[3], ARGV[2], opts, timestamp,
250
243
  parentKey, parentData, repeatJobKey)
251
244
  local target, paused = getTargetQueueList(metaKey, KEYS[1], KEYS[2])
245
+ if not paused then
246
+ -- mark that a job is available
247
+ rcall("ZADD", KEYS[7], 0, "0")
248
+ end
252
249
  -- LIFO or FIFO
253
250
  local pushCmd = opts['lifo'] and 'RPUSH' or 'LPUSH'
254
251
  rcall(pushCmd, target, jobId)
@@ -256,8 +253,6 @@ rcall(pushCmd, target, jobId)
256
253
  rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "waiting",
257
254
  "jobId", jobId)
258
255
  -- Check if this job is a child of another job, if so add it to the parents dependencies
259
- -- TODO: Should not be possible to add a child job to a parent that is not in the "waiting-children" status.
260
- -- fail in this case.
261
256
  if parentDependenciesKey ~= nil then
262
257
  rcall("SADD", parentDependenciesKey, jobIdKey)
263
258
  end
@@ -266,6 +261,6 @@ return jobId .. "" -- convert to string
266
261
  exports.addStandardJob = {
267
262
  name: 'addStandardJob',
268
263
  content,
269
- keys: 6,
264
+ keys: 7,
270
265
  };
271
- //# sourceMappingURL=addStandardJob-6.js.map
266
+ //# sourceMappingURL=addStandardJob-7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addStandardJob-7.js","sourceRoot":"","sources":["../../../src/scripts/addStandardJob-7.ts"],"names":[],"mappings":";;;AAAA,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgQf,CAAC;AACW,QAAA,cAAc,GAAG;IAC5B,IAAI,EAAE,gBAAgB;IACtB,OAAO;IACP,IAAI,EAAE,CAAC;CACR,CAAC"}