Skip to content

Commit 1a39b0b

Browse files
chore: wip
1 parent bcccebf commit 1a39b0b

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { Action } from '@stacksjs/actions'
2+
import { response } from '@stacksjs/router'
3+
import Job from '../../../storage/framework/orm/src/models/Job.ts'
4+
5+
export default new Action({
6+
name: 'FetchQueuesAction',
7+
description: 'Fetch all the queues',
8+
method: 'GET',
9+
async handle() {
10+
const queues = await Job.all()
11+
12+
return response.json(queues)
13+
},
14+
})

storage/framework/core/queue/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export async function storeJob(name: string, options: QueueOption): Promise<void
1717
timeout: null,
1818
timeoutAt: null,
1919
payload: options.payload || {},
20-
classElements: JSON.stringify(importedJob)
20+
classPayload: JSON.stringify(importedJob)
2121
})
2222

2323
const job = {

0 commit comments

Comments
 (0)