@prefecthq/prefect-ui-library
Version:
This library is the Vue and Typescript component library for [Prefect 2](https://github.com/PrefectHQ/prefect) and [Prefect Cloud 2](https://www.prefect.io/cloud/). _The components and utilities in this project are not meant to be used independently_.
21 lines (20 loc) • 716 B
text/typescript
import { createObjectLevelCan, WorkPoolQueue } from '@/models'
import { MockFunction } from '@/services'
export const randomWorkPoolQueue: MockFunction<WorkPoolQueue, [Partial<WorkPoolQueue>?]> = function(overrides = {}) {
return new WorkPoolQueue({
id: this.create('id'),
created: this.create('date'),
updated: this.create('date'),
workPoolId: this.create('id'),
workPoolName: this.create('noun'),
name: this.create('noun'),
description: this.create('paragraph'),
isPaused: this.create('boolean'),
concurrencyLimit: this.create('number'),
priority: this.create('number'),
lastPolled: null,
status: 'ready',
can: createObjectLevelCan(),
...overrides,
})
}