diff --git a/dev/tool/src/index.ts b/dev/tool/src/index.ts index 619ea1d4c7..9fc2bcd1cb 100644 --- a/dev/tool/src/index.ts +++ b/dev/tool/src/index.ts @@ -837,7 +837,7 @@ export function devTool ( }) program - .command('backup-compact-s3 ') + .command('backup-s3-compact ') .description('Compact a given backup to just one snapshot') .option('-f, --force', 'Force compact.', false) .action(async (bucketName: string, dirName: string, cmd: { force: boolean, print: boolean }) => { diff --git a/server/account/src/operations.ts b/server/account/src/operations.ts index d33659ab34..c9734af89c 100644 --- a/server/account/src/operations.ts +++ b/server/account/src/operations.ts @@ -1760,7 +1760,7 @@ export async function getWorkspaceInfo ( ctx.error('no workspace', { workspace: workspace.name, email }) throw new PlatformError(new Status(Severity.ERROR, platform.status.Forbidden, {})) } - if (_updateLastVisit && isAccount(account)) { + if (_updateLastVisit && (isAccount(account) || email === systemAccountEmail)) { void ctx.with('update-last-visit', {}, async () => { await updateLastVisit(db, ws, account as Account) }) diff --git a/server/backup/src/service.ts b/server/backup/src/service.ts index 9650305e8a..2355d70a2f 100644 --- a/server/backup/src/service.ts +++ b/server/backup/src/service.ts @@ -101,14 +101,17 @@ class BackupWorker { async schedule (ctx: MeasureContext): Promise { console.log('schedule timeout for', this.config.Interval, ' seconds') - this.interval = setTimeout(() => { - if (this.backupPromise !== undefined) { - void this.backupPromise.then(() => { - void this.triggerBackup(ctx) - }) - } - void this.triggerBackup(ctx) - }, this.config.Interval * 1000) + this.interval = setTimeout( + () => { + if (this.backupPromise !== undefined) { + void this.backupPromise.then(() => { + void this.triggerBackup(ctx) + }) + } + void this.triggerBackup(ctx) + }, + 5 * 60 * 1000 + ) // Re-check every 5 minutes. } async backup (