From c64881da0d7ba52437ee3ebb536cbe960fdef82d Mon Sep 17 00:00:00 2001 From: trivernis Date: Sun, 30 Jan 2022 19:27:45 +0100 Subject: [PATCH] Change order of integrity check and add vacuum Signed-off-by: trivernis --- mediarepo-daemon/Cargo.lock | 2 +- mediarepo-ui/src-tauri/Cargo.lock | 2 +- mediarepo-ui/src/api/api-types/job.ts | 3 ++- mediarepo-ui/src/app/app.component.scss | 1 + .../core/repositories-tab/repositories-tab.component.ts | 6 ++++-- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/mediarepo-daemon/Cargo.lock b/mediarepo-daemon/Cargo.lock index 756f8eb..a558e8e 100644 --- a/mediarepo-daemon/Cargo.lock +++ b/mediarepo-daemon/Cargo.lock @@ -1182,7 +1182,7 @@ checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" [[package]] name = "mediarepo-api" -version = "0.27.0" +version = "0.28.0" dependencies = [ "bromine", "chrono", diff --git a/mediarepo-ui/src-tauri/Cargo.lock b/mediarepo-ui/src-tauri/Cargo.lock index 190bbe3..dba865d 100644 --- a/mediarepo-ui/src-tauri/Cargo.lock +++ b/mediarepo-ui/src-tauri/Cargo.lock @@ -1499,7 +1499,7 @@ checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" [[package]] name = "mediarepo-api" -version = "0.27.0" +version = "0.28.0" dependencies = [ "async-trait", "bromine", diff --git a/mediarepo-ui/src/api/api-types/job.ts b/mediarepo-ui/src/api/api-types/job.ts index c61458a..cda973f 100644 --- a/mediarepo-ui/src/api/api-types/job.ts +++ b/mediarepo-ui/src/api/api-types/job.ts @@ -1,3 +1,4 @@ export type JobType = "MigrateContentDescriptors" | "CalculateSizes" - | "CheckIntegrity"; + | "CheckIntegrity" + | "Vacuum"; diff --git a/mediarepo-ui/src/app/app.component.scss b/mediarepo-ui/src/app/app.component.scss index a48a9a2..bfa0fc0 100644 --- a/mediarepo-ui/src/app/app.component.scss +++ b/mediarepo-ui/src/app/app.component.scss @@ -14,4 +14,5 @@ ::ng-deep .app-error { background-color: $warn; + color: $text; } diff --git a/mediarepo-ui/src/app/components/core/repositories-tab/repositories-tab.component.ts b/mediarepo-ui/src/app/components/core/repositories-tab/repositories-tab.component.ts index cd88052..ecb4843 100644 --- a/mediarepo-ui/src/app/components/core/repositories-tab/repositories-tab.component.ts +++ b/mediarepo-ui/src/app/components/core/repositories-tab/repositories-tab.component.ts @@ -111,13 +111,15 @@ export class RepositoriesTabComponent implements OnInit, AfterViewInit { } private async runRepositoryStartupTasks(dialogContext: BusyDialogContext): Promise { + dialogContext.message.next("Checking integrity..."); + await this.jobService.runJob("CheckIntegrity"); + dialogContext.message.next("Running a vacuum on the database..."); + await this.jobService.runJob("Vacuum"); dialogContext.message.next( "Migrating content descriptors to new format..."); await this.jobService.runJob("MigrateContentDescriptors"); dialogContext.message.next("Calculating repository sizes..."); await this.jobService.runJob("CalculateSizes"); - dialogContext.message.next("Checking integrity..."); - await this.jobService.runJob("CheckIntegrity"); dialogContext.message.next("Finished repository startup"); }