@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_.
20 lines (18 loc) • 584 B
text/typescript
import { ConcurrencyV2UpdateRequest } from '@/models/api/ConcurrencyV2UpdateRequest'
import { ConcurrencyV2Update } from '@/models/ConcurrencyV2Update'
import { MapFunction } from '@/services/Mapper'
export const mapConcurrencyV2UpdateToConcurrencyV2UpdateRequest: MapFunction<ConcurrencyV2Update, ConcurrencyV2UpdateRequest> = function(source) {
const {
active,
name,
limit,
} = source
return {
active,
name,
limit,
active_slots: source.activeSlots,
denied_slots: source.deniedSlots,
slot_decay_per_second: source.slotDecayPerSecond,
}
}