From 754765ece1640cf6febaeaa5bc1dc9a3511cf5b2 Mon Sep 17 00:00:00 2001 From: mertalev <101130780+mertalev@users.noreply.github.com> Date: Sat, 23 Mar 2024 19:53:06 -0400 Subject: [PATCH] disable concurrency --- mobile/openapi/doc/SystemConfigJobDto.md | 1 - mobile/openapi/lib/model/system_config_job_dto.dart | 10 +--------- mobile/openapi/test/system_config_job_dto_test.dart | 5 ----- open-api/immich-openapi-specs.json | 4 ---- open-api/typescript-sdk/src/fetch-client.ts | 1 - server/src/cores/system-config.core.ts | 1 - server/src/dtos/system-config.dto.ts | 6 ------ server/src/entities/system-config.entity.ts | 1 - server/src/interfaces/job.interface.ts | 2 +- 9 files changed, 2 insertions(+), 29 deletions(-) diff --git a/mobile/openapi/doc/SystemConfigJobDto.md b/mobile/openapi/doc/SystemConfigJobDto.md index f1d53a7bf..cb989e7d8 100644 --- a/mobile/openapi/doc/SystemConfigJobDto.md +++ b/mobile/openapi/doc/SystemConfigJobDto.md @@ -9,7 +9,6 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **backgroundTask** | [**JobSettingsDto**](JobSettingsDto.md) | | -**duplicateDetection** | [**JobSettingsDto**](JobSettingsDto.md) | | **faceDetection** | [**JobSettingsDto**](JobSettingsDto.md) | | **library_** | [**JobSettingsDto**](JobSettingsDto.md) | | **metadataExtraction** | [**JobSettingsDto**](JobSettingsDto.md) | | diff --git a/mobile/openapi/lib/model/system_config_job_dto.dart b/mobile/openapi/lib/model/system_config_job_dto.dart index 032d91372..3a23f1975 100644 --- a/mobile/openapi/lib/model/system_config_job_dto.dart +++ b/mobile/openapi/lib/model/system_config_job_dto.dart @@ -14,7 +14,6 @@ class SystemConfigJobDto { /// Returns a new [SystemConfigJobDto] instance. SystemConfigJobDto({ required this.backgroundTask, - required this.duplicateDetection, required this.faceDetection, required this.library_, required this.metadataExtraction, @@ -28,8 +27,6 @@ class SystemConfigJobDto { JobSettingsDto backgroundTask; - JobSettingsDto duplicateDetection; - JobSettingsDto faceDetection; JobSettingsDto library_; @@ -51,7 +48,6 @@ class SystemConfigJobDto { @override bool operator ==(Object other) => identical(this, other) || other is SystemConfigJobDto && other.backgroundTask == backgroundTask && - other.duplicateDetection == duplicateDetection && other.faceDetection == faceDetection && other.library_ == library_ && other.metadataExtraction == metadataExtraction && @@ -66,7 +62,6 @@ class SystemConfigJobDto { int get hashCode => // ignore: unnecessary_parenthesis (backgroundTask.hashCode) + - (duplicateDetection.hashCode) + (faceDetection.hashCode) + (library_.hashCode) + (metadataExtraction.hashCode) + @@ -78,12 +73,11 @@ class SystemConfigJobDto { (videoConversion.hashCode); @override - String toString() => 'SystemConfigJobDto[backgroundTask=$backgroundTask, duplicateDetection=$duplicateDetection, faceDetection=$faceDetection, library_=$library_, metadataExtraction=$metadataExtraction, migration=$migration, search=$search, sidecar=$sidecar, smartSearch=$smartSearch, thumbnailGeneration=$thumbnailGeneration, videoConversion=$videoConversion]'; + String toString() => 'SystemConfigJobDto[backgroundTask=$backgroundTask, faceDetection=$faceDetection, library_=$library_, metadataExtraction=$metadataExtraction, migration=$migration, search=$search, sidecar=$sidecar, smartSearch=$smartSearch, thumbnailGeneration=$thumbnailGeneration, videoConversion=$videoConversion]'; Map toJson() { final json = {}; json[r'backgroundTask'] = this.backgroundTask; - json[r'duplicateDetection'] = this.duplicateDetection; json[r'faceDetection'] = this.faceDetection; json[r'library'] = this.library_; json[r'metadataExtraction'] = this.metadataExtraction; @@ -105,7 +99,6 @@ class SystemConfigJobDto { return SystemConfigJobDto( backgroundTask: JobSettingsDto.fromJson(json[r'backgroundTask'])!, - duplicateDetection: JobSettingsDto.fromJson(json[r'duplicateDetection'])!, faceDetection: JobSettingsDto.fromJson(json[r'faceDetection'])!, library_: JobSettingsDto.fromJson(json[r'library'])!, metadataExtraction: JobSettingsDto.fromJson(json[r'metadataExtraction'])!, @@ -163,7 +156,6 @@ class SystemConfigJobDto { /// The list of required keys that must be present in a JSON. static const requiredKeys = { 'backgroundTask', - 'duplicateDetection', 'faceDetection', 'library', 'metadataExtraction', diff --git a/mobile/openapi/test/system_config_job_dto_test.dart b/mobile/openapi/test/system_config_job_dto_test.dart index 9e52d5752..4da78453e 100644 --- a/mobile/openapi/test/system_config_job_dto_test.dart +++ b/mobile/openapi/test/system_config_job_dto_test.dart @@ -21,11 +21,6 @@ void main() { // TODO }); - // JobSettingsDto duplicateDetection - test('to test the property `duplicateDetection`', () async { - // TODO - }); - // JobSettingsDto faceDetection test('to test the property `faceDetection`', () async { // TODO diff --git a/open-api/immich-openapi-specs.json b/open-api/immich-openapi-specs.json index 9cf3396b2..cd304e941 100644 --- a/open-api/immich-openapi-specs.json +++ b/open-api/immich-openapi-specs.json @@ -9917,9 +9917,6 @@ "backgroundTask": { "$ref": "#/components/schemas/JobSettingsDto" }, - "duplicateDetection": { - "$ref": "#/components/schemas/JobSettingsDto" - }, "faceDetection": { "$ref": "#/components/schemas/JobSettingsDto" }, @@ -9950,7 +9947,6 @@ }, "required": [ "backgroundTask", - "duplicateDetection", "faceDetection", "library", "metadataExtraction", diff --git a/open-api/typescript-sdk/src/fetch-client.ts b/open-api/typescript-sdk/src/fetch-client.ts index c582a21c8..57806d72b 100644 --- a/open-api/typescript-sdk/src/fetch-client.ts +++ b/open-api/typescript-sdk/src/fetch-client.ts @@ -833,7 +833,6 @@ export type JobSettingsDto = { }; export type SystemConfigJobDto = { backgroundTask: JobSettingsDto; - duplicateDetection: JobSettingsDto; faceDetection: JobSettingsDto; library: JobSettingsDto; metadataExtraction: JobSettingsDto; diff --git a/server/src/cores/system-config.core.ts b/server/src/cores/system-config.core.ts index 16f40e6ae..d01fe4324 100644 --- a/server/src/cores/system-config.core.ts +++ b/server/src/cores/system-config.core.ts @@ -55,7 +55,6 @@ export const defaults = Object.freeze({ [QueueName.METADATA_EXTRACTION]: { concurrency: 5 }, [QueueName.FACE_DETECTION]: { concurrency: 2 }, [QueueName.SEARCH]: { concurrency: 5 }, - [QueueName.DUPLICATE_DETECTION]: { concurrency: 5 }, [QueueName.SIDECAR]: { concurrency: 5 }, [QueueName.LIBRARY]: { concurrency: 5 }, [QueueName.MIGRATION]: { concurrency: 5 }, diff --git a/server/src/dtos/system-config.dto.ts b/server/src/dtos/system-config.dto.ts index 82b1844a7..740f1672e 100644 --- a/server/src/dtos/system-config.dto.ts +++ b/server/src/dtos/system-config.dto.ts @@ -184,12 +184,6 @@ class SystemConfigJobDto implements Record @Type(() => JobSettingsDto) [QueueName.SEARCH]!: JobSettingsDto; - @ApiProperty({ type: JobSettingsDto }) - @ValidateNested() - @IsObject() - @Type(() => JobSettingsDto) - [QueueName.DUPLICATE_DETECTION]!: JobSettingsDto; - @ApiProperty({ type: JobSettingsDto }) @ValidateNested() @IsObject() diff --git a/server/src/entities/system-config.entity.ts b/server/src/entities/system-config.entity.ts index ec59b4bc0..5dd0a0918 100644 --- a/server/src/entities/system-config.entity.ts +++ b/server/src/entities/system-config.entity.ts @@ -40,7 +40,6 @@ export enum SystemConfigKey { JOB_VIDEO_CONVERSION_CONCURRENCY = 'job.videoConversion.concurrency', JOB_FACE_DETECTION_CONCURRENCY = 'job.faceDetection.concurrency', JOB_SMART_SEARCH_CONCURRENCY = 'job.smartSearch.concurrency', - JOB_DUPLICATE_DETECTION_CONCURRENCY = 'job.duplicateDetection.concurrency', JOB_BACKGROUND_TASK_CONCURRENCY = 'job.backgroundTask.concurrency', JOB_STORAGE_TEMPLATE_MIGRATION_CONCURRENCY = 'job.storageTemplateMigration.concurrency', JOB_SEARCH_CONCURRENCY = 'job.search.concurrency', diff --git a/server/src/interfaces/job.interface.ts b/server/src/interfaces/job.interface.ts index 19455f51a..c9031e620 100644 --- a/server/src/interfaces/job.interface.ts +++ b/server/src/interfaces/job.interface.ts @@ -16,7 +16,7 @@ export enum QueueName { export type ConcurrentQueueName = Exclude< QueueName, - QueueName.STORAGE_TEMPLATE_MIGRATION | QueueName.FACIAL_RECOGNITION + QueueName.STORAGE_TEMPLATE_MIGRATION | QueueName.FACIAL_RECOGNITION | QueueName.DUPLICATE_DETECTION >; export enum JobCommand {