mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
configurable cleanup
This commit is contained in:
parent
d660ab2218
commit
7222d7af30
14 changed files with 183 additions and 5 deletions
1
mobile/openapi/README.md
generated
1
mobile/openapi/README.md
generated
|
|
@ -552,6 +552,7 @@ Class | Method | HTTP request | Description
|
||||||
- [SystemConfigNotificationsDto](doc//SystemConfigNotificationsDto.md)
|
- [SystemConfigNotificationsDto](doc//SystemConfigNotificationsDto.md)
|
||||||
- [SystemConfigOAuthDto](doc//SystemConfigOAuthDto.md)
|
- [SystemConfigOAuthDto](doc//SystemConfigOAuthDto.md)
|
||||||
- [SystemConfigPasswordLoginDto](doc//SystemConfigPasswordLoginDto.md)
|
- [SystemConfigPasswordLoginDto](doc//SystemConfigPasswordLoginDto.md)
|
||||||
|
- [SystemConfigRemovePartialUploadsDto](doc//SystemConfigRemovePartialUploadsDto.md)
|
||||||
- [SystemConfigReverseGeocodingDto](doc//SystemConfigReverseGeocodingDto.md)
|
- [SystemConfigReverseGeocodingDto](doc//SystemConfigReverseGeocodingDto.md)
|
||||||
- [SystemConfigServerDto](doc//SystemConfigServerDto.md)
|
- [SystemConfigServerDto](doc//SystemConfigServerDto.md)
|
||||||
- [SystemConfigSmtpDto](doc//SystemConfigSmtpDto.md)
|
- [SystemConfigSmtpDto](doc//SystemConfigSmtpDto.md)
|
||||||
|
|
|
||||||
1
mobile/openapi/lib/api.dart
generated
1
mobile/openapi/lib/api.dart
generated
|
|
@ -316,6 +316,7 @@ part 'model/system_config_nightly_tasks_dto.dart';
|
||||||
part 'model/system_config_notifications_dto.dart';
|
part 'model/system_config_notifications_dto.dart';
|
||||||
part 'model/system_config_o_auth_dto.dart';
|
part 'model/system_config_o_auth_dto.dart';
|
||||||
part 'model/system_config_password_login_dto.dart';
|
part 'model/system_config_password_login_dto.dart';
|
||||||
|
part 'model/system_config_remove_partial_uploads_dto.dart';
|
||||||
part 'model/system_config_reverse_geocoding_dto.dart';
|
part 'model/system_config_reverse_geocoding_dto.dart';
|
||||||
part 'model/system_config_server_dto.dart';
|
part 'model/system_config_server_dto.dart';
|
||||||
part 'model/system_config_smtp_dto.dart';
|
part 'model/system_config_smtp_dto.dart';
|
||||||
|
|
|
||||||
2
mobile/openapi/lib/api_client.dart
generated
2
mobile/openapi/lib/api_client.dart
generated
|
|
@ -684,6 +684,8 @@ class ApiClient {
|
||||||
return SystemConfigOAuthDto.fromJson(value);
|
return SystemConfigOAuthDto.fromJson(value);
|
||||||
case 'SystemConfigPasswordLoginDto':
|
case 'SystemConfigPasswordLoginDto':
|
||||||
return SystemConfigPasswordLoginDto.fromJson(value);
|
return SystemConfigPasswordLoginDto.fromJson(value);
|
||||||
|
case 'SystemConfigRemovePartialUploadsDto':
|
||||||
|
return SystemConfigRemovePartialUploadsDto.fromJson(value);
|
||||||
case 'SystemConfigReverseGeocodingDto':
|
case 'SystemConfigReverseGeocodingDto':
|
||||||
return SystemConfigReverseGeocodingDto.fromJson(value);
|
return SystemConfigReverseGeocodingDto.fromJson(value);
|
||||||
case 'SystemConfigServerDto':
|
case 'SystemConfigServerDto':
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ class SystemConfigNightlyTasksDto {
|
||||||
required this.databaseCleanup,
|
required this.databaseCleanup,
|
||||||
required this.generateMemories,
|
required this.generateMemories,
|
||||||
required this.missingThumbnails,
|
required this.missingThumbnails,
|
||||||
|
required this.removeStaleUploads,
|
||||||
required this.startTime,
|
required this.startTime,
|
||||||
required this.syncQuotaUsage,
|
required this.syncQuotaUsage,
|
||||||
});
|
});
|
||||||
|
|
@ -29,6 +30,8 @@ class SystemConfigNightlyTasksDto {
|
||||||
|
|
||||||
bool missingThumbnails;
|
bool missingThumbnails;
|
||||||
|
|
||||||
|
SystemConfigRemovePartialUploadsDto removeStaleUploads;
|
||||||
|
|
||||||
String startTime;
|
String startTime;
|
||||||
|
|
||||||
bool syncQuotaUsage;
|
bool syncQuotaUsage;
|
||||||
|
|
@ -39,6 +42,7 @@ class SystemConfigNightlyTasksDto {
|
||||||
other.databaseCleanup == databaseCleanup &&
|
other.databaseCleanup == databaseCleanup &&
|
||||||
other.generateMemories == generateMemories &&
|
other.generateMemories == generateMemories &&
|
||||||
other.missingThumbnails == missingThumbnails &&
|
other.missingThumbnails == missingThumbnails &&
|
||||||
|
other.removeStaleUploads == removeStaleUploads &&
|
||||||
other.startTime == startTime &&
|
other.startTime == startTime &&
|
||||||
other.syncQuotaUsage == syncQuotaUsage;
|
other.syncQuotaUsage == syncQuotaUsage;
|
||||||
|
|
||||||
|
|
@ -49,11 +53,12 @@ class SystemConfigNightlyTasksDto {
|
||||||
(databaseCleanup.hashCode) +
|
(databaseCleanup.hashCode) +
|
||||||
(generateMemories.hashCode) +
|
(generateMemories.hashCode) +
|
||||||
(missingThumbnails.hashCode) +
|
(missingThumbnails.hashCode) +
|
||||||
|
(removeStaleUploads.hashCode) +
|
||||||
(startTime.hashCode) +
|
(startTime.hashCode) +
|
||||||
(syncQuotaUsage.hashCode);
|
(syncQuotaUsage.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'SystemConfigNightlyTasksDto[clusterNewFaces=$clusterNewFaces, databaseCleanup=$databaseCleanup, generateMemories=$generateMemories, missingThumbnails=$missingThumbnails, startTime=$startTime, syncQuotaUsage=$syncQuotaUsage]';
|
String toString() => 'SystemConfigNightlyTasksDto[clusterNewFaces=$clusterNewFaces, databaseCleanup=$databaseCleanup, generateMemories=$generateMemories, missingThumbnails=$missingThumbnails, removeStaleUploads=$removeStaleUploads, startTime=$startTime, syncQuotaUsage=$syncQuotaUsage]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
|
|
@ -61,6 +66,7 @@ class SystemConfigNightlyTasksDto {
|
||||||
json[r'databaseCleanup'] = this.databaseCleanup;
|
json[r'databaseCleanup'] = this.databaseCleanup;
|
||||||
json[r'generateMemories'] = this.generateMemories;
|
json[r'generateMemories'] = this.generateMemories;
|
||||||
json[r'missingThumbnails'] = this.missingThumbnails;
|
json[r'missingThumbnails'] = this.missingThumbnails;
|
||||||
|
json[r'removeStaleUploads'] = this.removeStaleUploads;
|
||||||
json[r'startTime'] = this.startTime;
|
json[r'startTime'] = this.startTime;
|
||||||
json[r'syncQuotaUsage'] = this.syncQuotaUsage;
|
json[r'syncQuotaUsage'] = this.syncQuotaUsage;
|
||||||
return json;
|
return json;
|
||||||
|
|
@ -79,6 +85,7 @@ class SystemConfigNightlyTasksDto {
|
||||||
databaseCleanup: mapValueOfType<bool>(json, r'databaseCleanup')!,
|
databaseCleanup: mapValueOfType<bool>(json, r'databaseCleanup')!,
|
||||||
generateMemories: mapValueOfType<bool>(json, r'generateMemories')!,
|
generateMemories: mapValueOfType<bool>(json, r'generateMemories')!,
|
||||||
missingThumbnails: mapValueOfType<bool>(json, r'missingThumbnails')!,
|
missingThumbnails: mapValueOfType<bool>(json, r'missingThumbnails')!,
|
||||||
|
removeStaleUploads: SystemConfigRemovePartialUploadsDto.fromJson(json[r'removeStaleUploads'])!,
|
||||||
startTime: mapValueOfType<String>(json, r'startTime')!,
|
startTime: mapValueOfType<String>(json, r'startTime')!,
|
||||||
syncQuotaUsage: mapValueOfType<bool>(json, r'syncQuotaUsage')!,
|
syncQuotaUsage: mapValueOfType<bool>(json, r'syncQuotaUsage')!,
|
||||||
);
|
);
|
||||||
|
|
@ -132,6 +139,7 @@ class SystemConfigNightlyTasksDto {
|
||||||
'databaseCleanup',
|
'databaseCleanup',
|
||||||
'generateMemories',
|
'generateMemories',
|
||||||
'missingThumbnails',
|
'missingThumbnails',
|
||||||
|
'removeStaleUploads',
|
||||||
'startTime',
|
'startTime',
|
||||||
'syncQuotaUsage',
|
'syncQuotaUsage',
|
||||||
};
|
};
|
||||||
|
|
|
||||||
108
mobile/openapi/lib/model/system_config_remove_partial_uploads_dto.dart
generated
Normal file
108
mobile/openapi/lib/model/system_config_remove_partial_uploads_dto.dart
generated
Normal file
|
|
@ -0,0 +1,108 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.18
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element, unused_import
|
||||||
|
// ignore_for_file: always_put_required_named_parameters_first
|
||||||
|
// ignore_for_file: constant_identifier_names
|
||||||
|
// ignore_for_file: lines_longer_than_80_chars
|
||||||
|
|
||||||
|
part of openapi.api;
|
||||||
|
|
||||||
|
class SystemConfigRemovePartialUploadsDto {
|
||||||
|
/// Returns a new [SystemConfigRemovePartialUploadsDto] instance.
|
||||||
|
SystemConfigRemovePartialUploadsDto({
|
||||||
|
required this.enabled,
|
||||||
|
required this.hoursAgo,
|
||||||
|
});
|
||||||
|
|
||||||
|
bool enabled;
|
||||||
|
|
||||||
|
/// Minimum value: 1
|
||||||
|
int hoursAgo;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is SystemConfigRemovePartialUploadsDto &&
|
||||||
|
other.enabled == enabled &&
|
||||||
|
other.hoursAgo == hoursAgo;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(enabled.hashCode) +
|
||||||
|
(hoursAgo.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => 'SystemConfigRemovePartialUploadsDto[enabled=$enabled, hoursAgo=$hoursAgo]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
json[r'enabled'] = this.enabled;
|
||||||
|
json[r'hoursAgo'] = this.hoursAgo;
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [SystemConfigRemovePartialUploadsDto] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static SystemConfigRemovePartialUploadsDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "SystemConfigRemovePartialUploadsDto");
|
||||||
|
if (value is Map) {
|
||||||
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
|
return SystemConfigRemovePartialUploadsDto(
|
||||||
|
enabled: mapValueOfType<bool>(json, r'enabled')!,
|
||||||
|
hoursAgo: mapValueOfType<int>(json, r'hoursAgo')!,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<SystemConfigRemovePartialUploadsDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <SystemConfigRemovePartialUploadsDto>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = SystemConfigRemovePartialUploadsDto.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, SystemConfigRemovePartialUploadsDto> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, SystemConfigRemovePartialUploadsDto>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = SystemConfigRemovePartialUploadsDto.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of SystemConfigRemovePartialUploadsDto-objects as value to a dart map
|
||||||
|
static Map<String, List<SystemConfigRemovePartialUploadsDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<SystemConfigRemovePartialUploadsDto>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = SystemConfigRemovePartialUploadsDto.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
'enabled',
|
||||||
|
'hoursAgo',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -17194,6 +17194,9 @@
|
||||||
"missingThumbnails": {
|
"missingThumbnails": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
|
"removeStaleUploads": {
|
||||||
|
"$ref": "#/components/schemas/SystemConfigRemovePartialUploadsDto"
|
||||||
|
},
|
||||||
"startTime": {
|
"startTime": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
|
@ -17206,6 +17209,7 @@
|
||||||
"databaseCleanup",
|
"databaseCleanup",
|
||||||
"generateMemories",
|
"generateMemories",
|
||||||
"missingThumbnails",
|
"missingThumbnails",
|
||||||
|
"removeStaleUploads",
|
||||||
"startTime",
|
"startTime",
|
||||||
"syncQuotaUsage"
|
"syncQuotaUsage"
|
||||||
],
|
],
|
||||||
|
|
@ -17321,6 +17325,22 @@
|
||||||
],
|
],
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"SystemConfigRemovePartialUploadsDto": {
|
||||||
|
"properties": {
|
||||||
|
"enabled": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"hoursAgo": {
|
||||||
|
"minimum": 1,
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"enabled",
|
||||||
|
"hoursAgo"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"SystemConfigReverseGeocodingDto": {
|
"SystemConfigReverseGeocodingDto": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"enabled": {
|
"enabled": {
|
||||||
|
|
|
||||||
|
|
@ -1484,11 +1484,16 @@ export type SystemConfigMetadataDto = {
|
||||||
export type SystemConfigNewVersionCheckDto = {
|
export type SystemConfigNewVersionCheckDto = {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
};
|
};
|
||||||
|
export type SystemConfigRemovePartialUploadsDto = {
|
||||||
|
enabled: boolean;
|
||||||
|
hoursAgo: number;
|
||||||
|
};
|
||||||
export type SystemConfigNightlyTasksDto = {
|
export type SystemConfigNightlyTasksDto = {
|
||||||
clusterNewFaces: boolean;
|
clusterNewFaces: boolean;
|
||||||
databaseCleanup: boolean;
|
databaseCleanup: boolean;
|
||||||
generateMemories: boolean;
|
generateMemories: boolean;
|
||||||
missingThumbnails: boolean;
|
missingThumbnails: boolean;
|
||||||
|
removeStaleUploads: SystemConfigRemovePartialUploadsDto;
|
||||||
startTime: string;
|
startTime: string;
|
||||||
syncQuotaUsage: boolean;
|
syncQuotaUsage: boolean;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -140,6 +140,10 @@ export interface SystemConfig {
|
||||||
clusterNewFaces: boolean;
|
clusterNewFaces: boolean;
|
||||||
generateMemories: boolean;
|
generateMemories: boolean;
|
||||||
syncQuotaUsage: boolean;
|
syncQuotaUsage: boolean;
|
||||||
|
removeStaleUploads: {
|
||||||
|
enabled: boolean;
|
||||||
|
hoursAgo: number;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
trash: {
|
trash: {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
|
|
@ -341,6 +345,10 @@ export const defaults = Object.freeze<SystemConfig>({
|
||||||
syncQuotaUsage: true,
|
syncQuotaUsage: true,
|
||||||
missingThumbnails: true,
|
missingThumbnails: true,
|
||||||
clusterNewFaces: true,
|
clusterNewFaces: true,
|
||||||
|
removeStaleUploads: {
|
||||||
|
enabled: true,
|
||||||
|
hoursAgo: 72,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
trash: {
|
trash: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
|
|
||||||
|
|
@ -337,6 +337,17 @@ class SystemConfigNewVersionCheckDto {
|
||||||
enabled!: boolean;
|
enabled!: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class SystemConfigRemovePartialUploadsDto {
|
||||||
|
@ValidateBoolean()
|
||||||
|
enabled!: boolean;
|
||||||
|
|
||||||
|
@IsInt()
|
||||||
|
@Min(1)
|
||||||
|
@Type(() => Number)
|
||||||
|
@ApiProperty({ type: 'integer' })
|
||||||
|
hoursAgo!: number;
|
||||||
|
}
|
||||||
|
|
||||||
class SystemConfigNightlyTasksDto {
|
class SystemConfigNightlyTasksDto {
|
||||||
@IsDateStringFormat('HH:mm', { message: 'startTime must be in HH:mm format' })
|
@IsDateStringFormat('HH:mm', { message: 'startTime must be in HH:mm format' })
|
||||||
startTime!: string;
|
startTime!: string;
|
||||||
|
|
@ -355,6 +366,11 @@ class SystemConfigNightlyTasksDto {
|
||||||
|
|
||||||
@ValidateBoolean()
|
@ValidateBoolean()
|
||||||
syncQuotaUsage!: boolean;
|
syncQuotaUsage!: boolean;
|
||||||
|
|
||||||
|
@Type(() => SystemConfigRemovePartialUploadsDto)
|
||||||
|
@ValidateNested()
|
||||||
|
@IsObject()
|
||||||
|
removeStaleUploads!: SystemConfigRemovePartialUploadsDto;
|
||||||
}
|
}
|
||||||
|
|
||||||
class SystemConfigOAuthDto {
|
class SystemConfigOAuthDto {
|
||||||
|
|
|
||||||
|
|
@ -202,8 +202,8 @@ export class AssetUploadService extends BaseService {
|
||||||
|
|
||||||
@OnJob({ name: JobName.PartialAssetCleanupQueueAll, queue: QueueName.BackgroundTask })
|
@OnJob({ name: JobName.PartialAssetCleanupQueueAll, queue: QueueName.BackgroundTask })
|
||||||
async removeStaleUploads(): Promise<void> {
|
async removeStaleUploads(): Promise<void> {
|
||||||
// TODO: make this configurable
|
const config = await this.getConfig({ withCache: false });
|
||||||
const createdBefore = DateTime.now().minus({ days: 7 }).toJSDate();
|
const createdBefore = DateTime.now().minus({ hours: config.nightlyTasks.removeStaleUploads.hoursAgo }).toJSDate();
|
||||||
let jobs: JobItem[] = [];
|
let jobs: JobItem[] = [];
|
||||||
const assets = this.assetJobRepository.streamForPartialAssetCleanupJob(createdBefore);
|
const assets = this.assetJobRepository.streamForPartialAssetCleanupJob(createdBefore);
|
||||||
for await (const asset of assets) {
|
for await (const asset of assets) {
|
||||||
|
|
@ -329,7 +329,7 @@ export class AssetUploadService extends BaseService {
|
||||||
const abortEvent = { assetId, abortTime };
|
const abortEvent = { assetId, abortTime };
|
||||||
// only emit if we didn't just abort it ourselves
|
// only emit if we didn't just abort it ourselves
|
||||||
if (!this.onUploadAbort(abortEvent)) {
|
if (!this.onUploadAbort(abortEvent)) {
|
||||||
this.eventRepository.serverSend('UploadAbort', abortEvent);
|
this.websocketRepository.serverSend('UploadAbort', abortEvent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ describe(JobService.name, () => {
|
||||||
{ name: JobName.UserSyncUsage },
|
{ name: JobName.UserSyncUsage },
|
||||||
{ name: JobName.AssetGenerateThumbnailsQueueAll, data: { force: false } },
|
{ name: JobName.AssetGenerateThumbnailsQueueAll, data: { force: false } },
|
||||||
{ name: JobName.FacialRecognitionQueueAll, data: { force: false, nightly: true } },
|
{ name: JobName.FacialRecognitionQueueAll, data: { force: false, nightly: true } },
|
||||||
|
{ name: JobName.PartialAssetCleanupQueueAll },
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -303,6 +303,10 @@ export class JobService extends BaseService {
|
||||||
jobs.push({ name: JobName.FacialRecognitionQueueAll, data: { force: false, nightly: true } });
|
jobs.push({ name: JobName.FacialRecognitionQueueAll, data: { force: false, nightly: true } });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config.nightlyTasks.removeStaleUploads.enabled) {
|
||||||
|
jobs.push({ name: JobName.PartialAssetCleanupQueueAll });
|
||||||
|
}
|
||||||
|
|
||||||
await this.jobRepository.queueAll(jobs);
|
await this.jobRepository.queueAll(jobs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,10 @@ const updatedConfig = Object.freeze<SystemConfig>({
|
||||||
missingThumbnails: true,
|
missingThumbnails: true,
|
||||||
generateMemories: true,
|
generateMemories: true,
|
||||||
syncQuotaUsage: true,
|
syncQuotaUsage: true,
|
||||||
|
removeStaleUploads: {
|
||||||
|
enabled: true,
|
||||||
|
hoursAgo: 72,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
reverseGeocoding: {
|
reverseGeocoding: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
|
|
||||||
|
|
@ -353,7 +353,7 @@ export type JobItem =
|
||||||
| { name: JobName.AssetDelete; data: IAssetDeleteJob }
|
| { name: JobName.AssetDelete; data: IAssetDeleteJob }
|
||||||
| { name: JobName.AssetDeleteCheck; data?: IBaseJob }
|
| { name: JobName.AssetDeleteCheck; data?: IBaseJob }
|
||||||
| { name: JobName.PartialAssetCleanup; data: IEntityJob }
|
| { name: JobName.PartialAssetCleanup; data: IEntityJob }
|
||||||
| { name: JobName.PartialAssetCleanupQueueAll; data: IBaseJob }
|
| { name: JobName.PartialAssetCleanupQueueAll; data?: IBaseJob }
|
||||||
|
|
||||||
// Library Management
|
// Library Management
|
||||||
| { name: JobName.LibrarySyncFiles; data: ILibraryFileJob }
|
| { name: JobName.LibrarySyncFiles; data: ILibraryFileJob }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue