bunqueue 2.8.24 → 2.8.25
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.
|
@@ -106,6 +106,11 @@ export async function getJob(ctx, id) {
|
|
|
106
106
|
});
|
|
107
107
|
if (j.progress !== undefined)
|
|
108
108
|
result.progress = j.progress;
|
|
109
|
+
// Mirror getJob/buildJobProperties: a number maps through, null → undefined (#104)
|
|
110
|
+
if (typeof j.startedAt === 'number')
|
|
111
|
+
result.processedOn = j.startedAt;
|
|
112
|
+
if (typeof j.completedAt === 'number')
|
|
113
|
+
result.finishedOn = j.completedAt;
|
|
109
114
|
return result;
|
|
110
115
|
}
|
|
111
116
|
/** Get job state by ID */
|
|
@@ -160,7 +165,7 @@ export function getJobs(ctx, options = {}) {
|
|
|
160
165
|
});
|
|
161
166
|
return jobs.map((j) => {
|
|
162
167
|
const name = j.data?.name ?? 'unknown';
|
|
163
|
-
|
|
168
|
+
const result = createSimpleJob(String(j.id), name, j.data, j.createdAt, {
|
|
164
169
|
queueName: ctx.name,
|
|
165
170
|
embedded: ctx.embedded,
|
|
166
171
|
tcp: ctx.tcp,
|
|
@@ -169,6 +174,12 @@ export function getJobs(ctx, options = {}) {
|
|
|
169
174
|
retryJob: ctx.retryJob,
|
|
170
175
|
getChildrenValues: ctx.getChildrenValues,
|
|
171
176
|
});
|
|
177
|
+
// Mirror getJob/buildJobProperties: a number maps through, null → undefined (#104)
|
|
178
|
+
if (typeof j.startedAt === 'number')
|
|
179
|
+
result.processedOn = j.startedAt;
|
|
180
|
+
if (typeof j.completedAt === 'number')
|
|
181
|
+
result.finishedOn = j.completedAt;
|
|
182
|
+
return result;
|
|
172
183
|
});
|
|
173
184
|
}
|
|
174
185
|
/** Get jobs with filtering (async, works with TCP) */
|
|
@@ -211,6 +222,11 @@ export async function getJobsAsync(ctx, options = {}) {
|
|
|
211
222
|
result.priority = j.priority;
|
|
212
223
|
if (j.attempts !== undefined)
|
|
213
224
|
result.attemptsMade = j.attempts;
|
|
225
|
+
// Mirror getJob/buildJobProperties: a number maps through, null → undefined (#104)
|
|
226
|
+
if (typeof j.startedAt === 'number')
|
|
227
|
+
result.processedOn = j.startedAt;
|
|
228
|
+
if (typeof j.completedAt === 'number')
|
|
229
|
+
result.finishedOn = j.completedAt;
|
|
214
230
|
return result;
|
|
215
231
|
});
|
|
216
232
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bunqueue",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.25",
|
|
4
4
|
"description": "High-performance job queue for Bun & AI agents. SQLite persistence, cron scheduling, priorities, retries, DLQ, webhooks, native MCP server. Zero external dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/main.js",
|