mirror of
https://github.com/samsonjs/immich.git
synced 2026-04-27 15:07:45 +00:00
73 lines
1.9 KiB
TypeScript
73 lines
1.9 KiB
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import { Type } from 'class-transformer';
|
|
import { IsInt, IsObject, IsPositive, ValidateNested } from 'class-validator';
|
|
import { ConcurrentQueueName, QueueName } from 'src/interfaces/job.interface';
|
|
|
|
export class JobSettingsDto {
|
|
@IsInt()
|
|
@IsPositive()
|
|
@ApiProperty({ type: 'integer' })
|
|
concurrency!: number;
|
|
}
|
|
|
|
export class SystemConfigJobDto implements Record<ConcurrentQueueName, JobSettingsDto> {
|
|
@ApiProperty({ type: JobSettingsDto })
|
|
@ValidateNested()
|
|
@IsObject()
|
|
@Type(() => JobSettingsDto)
|
|
[QueueName.THUMBNAIL_GENERATION]!: JobSettingsDto;
|
|
|
|
@ApiProperty({ type: JobSettingsDto })
|
|
@ValidateNested()
|
|
@IsObject()
|
|
@Type(() => JobSettingsDto)
|
|
[QueueName.METADATA_EXTRACTION]!: JobSettingsDto;
|
|
|
|
@ApiProperty({ type: JobSettingsDto })
|
|
@ValidateNested()
|
|
@IsObject()
|
|
@Type(() => JobSettingsDto)
|
|
[QueueName.VIDEO_CONVERSION]!: JobSettingsDto;
|
|
|
|
@ApiProperty({ type: JobSettingsDto })
|
|
@ValidateNested()
|
|
@IsObject()
|
|
@Type(() => JobSettingsDto)
|
|
[QueueName.SMART_SEARCH]!: JobSettingsDto;
|
|
|
|
@ApiProperty({ type: JobSettingsDto })
|
|
@ValidateNested()
|
|
@IsObject()
|
|
@Type(() => JobSettingsDto)
|
|
[QueueName.MIGRATION]!: JobSettingsDto;
|
|
|
|
@ApiProperty({ type: JobSettingsDto })
|
|
@ValidateNested()
|
|
@IsObject()
|
|
@Type(() => JobSettingsDto)
|
|
[QueueName.BACKGROUND_TASK]!: JobSettingsDto;
|
|
|
|
@ApiProperty({ type: JobSettingsDto })
|
|
@ValidateNested()
|
|
@IsObject()
|
|
@Type(() => JobSettingsDto)
|
|
[QueueName.SEARCH]!: JobSettingsDto;
|
|
|
|
@ApiProperty({ type: JobSettingsDto })
|
|
@ValidateNested()
|
|
@IsObject()
|
|
@Type(() => JobSettingsDto)
|
|
[QueueName.FACE_DETECTION]!: JobSettingsDto;
|
|
|
|
@ApiProperty({ type: JobSettingsDto })
|
|
@ValidateNested()
|
|
@IsObject()
|
|
@Type(() => JobSettingsDto)
|
|
[QueueName.SIDECAR]!: JobSettingsDto;
|
|
|
|
@ApiProperty({ type: JobSettingsDto })
|
|
@ValidateNested()
|
|
@IsObject()
|
|
@Type(() => JobSettingsDto)
|
|
[QueueName.LIBRARY]!: JobSettingsDto;
|
|
}
|