UNPKG

@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_.

18 lines (17 loc) 706 B
import { WorkPoolWorker } from '@/models' import { MockFunction } from '@/services' export const randomWorker: MockFunction<WorkPoolWorker, [Partial<WorkPoolWorker>?]> = function(overrides = {}) { return new WorkPoolWorker({ id: this.create('id'), created: this.create('date'), updated: this.create('date'), workPoolId: this.create('id'), name: this.create('noun'), lastHeartbeatTime: this.create('date'), status: this.create('workerStatus'), clientVersion: this.create('string'), metadata: { integrations: [{ name: this.create('string'), version: this.create('string') }], 'foo': 'bar' }, heartbeatIntervalSeconds: this.create('number'), ...overrides, }) }