File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { z } from "zod" ;
22
3+ /**
4+ * The type of queue, either "task" or "custom"
5+ * "task" are created automatically for each task.
6+ * "custom" are created by you explicitly in your code.
7+ * */
38export const QueueType = z . enum ( [ "task" , "custom" ] ) ;
49export type QueueType = z . infer < typeof QueueType > ;
510
611export const QueueItem = z . object ( {
12+ /** The queue name */
713 name : z . string ( ) ,
14+ /**
15+ * The queue type, either "task" or "custom"
16+ * "task" are created automatically for each task.
17+ * "custom" are created by you explicitly in your code.
18+ * */
819 type : QueueType ,
20+ /** The number of runs currently running */
921 running : z . number ( ) ,
22+ /** The number of runs currently queued */
1023 queued : z . number ( ) ,
24+ /** The concurrency limit of the queue */
1125 concurrencyLimit : z . number ( ) . nullable ( ) ,
1226} ) ;
1327
28+ export type QueueItem = z . infer < typeof QueueItem > ;
29+
1430export const ListQueueOptions = z . object ( {
31+ /** The page number */
1532 page : z . number ( ) . optional ( ) ,
33+ /** The number of queues per page */
1634 perPage : z . number ( ) . optional ( ) ,
1735} ) ;
1836
Original file line number Diff line number Diff line change @@ -9,11 +9,11 @@ import {
99import { tracer } from "./tracer.js" ;
1010
1111/**
12- * Lists schedules
12+ * Lists queues
1313 * @param options - The list options
1414 * @param options.page - The page number
15- * @param options.perPage - The number of schedules per page
16- * @returns The list of schedules
15+ * @param options.perPage - The number of queues per page
16+ * @returns The list of queues
1717 */
1818export function list (
1919 options ?: ListQueueOptions ,
You can’t perform that action at this time.
0 commit comments