mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-29 17:14:37 +03:00
UBERF-8302: Fix lastVisit (#6755)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
14e6a85301
commit
7cb6c3a89a
@ -837,7 +837,7 @@ export function devTool (
|
||||
})
|
||||
|
||||
program
|
||||
.command('backup-compact-s3 <bucketName> <dirName>')
|
||||
.command('backup-s3-compact <bucketName> <dirName>')
|
||||
.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 }) => {
|
||||
|
@ -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)
|
||||
})
|
||||
|
@ -101,14 +101,17 @@ class BackupWorker {
|
||||
|
||||
async schedule (ctx: MeasureContext): Promise<void> {
|
||||
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 (
|
||||
|
Loading…
Reference in New Issue
Block a user