mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-29 16:10:07 +00:00
fix(storage): a pass on a database this installation does not recognise only reports
While a restore's reset is still pending, or the database names another installation, the nightly pass judges and reports but deletes nothing, whatever the restored switch says.
This commit is contained in:
@@ -258,7 +258,12 @@ export class StorageReclaimService implements OnModuleInit {
|
||||
private async pass(reportOnly: boolean, now: Date): Promise<StorageReclaimReport> {
|
||||
const wallStart = Date.now();
|
||||
const installId = this.install.installId();
|
||||
const deleting = !reportOnly && installId !== null && (await readReclaimDeleteEnabled(this.appSettings, installId));
|
||||
// A database this installation does not recognise (a restore whose reset did not run yet) only reports.
|
||||
const deleting =
|
||||
!reportOnly &&
|
||||
installId !== null &&
|
||||
(await this.install.databaseIsThis(installId)) &&
|
||||
(await readReclaimDeleteEnabled(this.appSettings, installId));
|
||||
const ctx: PassContext = {
|
||||
now: now.getTime(),
|
||||
installId,
|
||||
|
||||
Reference in New Issue
Block a user