mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 09:12:57 +02:00
feat: Use postgres as a queue
We've been keen to try this for a while as it means we can remove redis as a dependency, which makes Immich easier to setup and run. This replaces bullmq with a bespoke postgres queue. Jobs in the queue are processed either immediately via triggers and notifications, or eventually if a notification is missed.
This commit is contained in:
parent
b845184c80
commit
d46e5f2436
47 changed files with 751 additions and 933 deletions
mobile/openapi/lib/model
24
mobile/openapi/lib/model/queue_status_dto.dart
generated
24
mobile/openapi/lib/model/queue_status_dto.dart
generated
|
@ -13,32 +13,26 @@ part of openapi.api;
|
|||
class QueueStatusDto {
|
||||
/// Returns a new [QueueStatusDto] instance.
|
||||
QueueStatusDto({
|
||||
required this.isActive,
|
||||
required this.isPaused,
|
||||
required this.paused,
|
||||
});
|
||||
|
||||
bool isActive;
|
||||
|
||||
bool isPaused;
|
||||
bool paused;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is QueueStatusDto &&
|
||||
other.isActive == isActive &&
|
||||
other.isPaused == isPaused;
|
||||
other.paused == paused;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(isActive.hashCode) +
|
||||
(isPaused.hashCode);
|
||||
(paused.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'QueueStatusDto[isActive=$isActive, isPaused=$isPaused]';
|
||||
String toString() => 'QueueStatusDto[paused=$paused]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'isActive'] = this.isActive;
|
||||
json[r'isPaused'] = this.isPaused;
|
||||
json[r'paused'] = this.paused;
|
||||
return json;
|
||||
}
|
||||
|
||||
|
@ -51,8 +45,7 @@ class QueueStatusDto {
|
|||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return QueueStatusDto(
|
||||
isActive: mapValueOfType<bool>(json, r'isActive')!,
|
||||
isPaused: mapValueOfType<bool>(json, r'isPaused')!,
|
||||
paused: mapValueOfType<bool>(json, r'paused')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
@ -100,8 +93,7 @@ class QueueStatusDto {
|
|||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'isActive',
|
||||
'isPaused',
|
||||
'paused',
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue