File tree Expand file tree Collapse file tree 4 files changed +13
-13
lines changed Expand file tree Collapse file tree 4 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ const searchHandler: ((value: string) => void) | undefined =
138138 />
139139 </div >
140140 </TableHead >
141- <TableHead > Worker </TableHead >
141+ <TableHead > Broker </TableHead >
142142 </TableRow >
143143 </TableHeader >
144144 <TableBody >
Original file line number Diff line number Diff line change 11import {
22 taskRouteParamsSchema ,
3- taskStartedRequestSchema ,
4- } from " ../../../schemas/tasks"
5- import { tasksRepository } from " ../../../repositories/tasks"
6- import { envVariables } from " ~/server/env"
3+ taskStartedRequestSchema
4+ } from ' ../../../schemas/tasks'
5+ import { tasksRepository } from ' ../../../repositories/tasks'
6+ import { envVariables } from ' ~/server/env'
77
88export default defineEventHandler ( async ( event ) => {
9- const accessToken = getRequestHeader ( event , " access-token" )
9+ const accessToken = getRequestHeader ( event , ' access-token' )
1010 if ( ! accessToken || accessToken !== envVariables . taskiqAdminApiToken ) {
1111 throw createError ( {
1212 status : 401 ,
13- statusMessage : " Unauthorized" ,
14- message : " Invalid access token" ,
13+ statusMessage : ' Unauthorized' ,
14+ message : ' Invalid access token'
1515 } )
1616 }
1717 const params = await getValidatedRouterParams (
@@ -24,15 +24,15 @@ export default defineEventHandler(async (event) => {
2424 finishedAt : null ,
2525 returnValue : null ,
2626 executionTime : null ,
27- state : " running" ,
27+ state : ' running' ,
2828 args : body . args ,
2929 id : params . id ,
3030 worker : body . worker ,
3131 kwargs : body . kwargs ,
3232 name : body . taskName ,
33- startedAt : body . startedAt ,
33+ startedAt : body . startedAt
3434 } )
3535 return {
36- success : true ,
36+ success : true
3737 }
3838} )
Original file line number Diff line number Diff line change @@ -71,9 +71,9 @@ class TasksRepository {
7171 async create ( values : {
7272 id : string
7373 name : string
74- worker : string
7574 startedAt : Date
7675 args : Array < any >
76+ worker : string | null
7777 finishedAt : Date | null
7878 kwargs : Record < string , any >
7979 executionTime : number | null
Original file line number Diff line number Diff line change 11import { z } from 'zod'
22
33export const taskStartedRequestSchema = z . object ( {
4- worker : z . string ( ) ,
54 taskName : z . string ( ) ,
65 startedAt : z . coerce . date ( ) ,
76 args : z . array ( z . unknown ( ) ) ,
7+ worker : z . string ( ) . nullable ( ) ,
88 kwargs : z . record ( z . string ( ) , z . unknown ( ) )
99} )
1010
You can’t perform that action at this time.
0 commit comments