mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-10 10:17:23 +00:00
Merge remote-tracking branch 'origin/develop' into staging
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
commit
2929c07bc0
@ -837,7 +837,7 @@ export function devTool (
|
|||||||
})
|
})
|
||||||
|
|
||||||
program
|
program
|
||||||
.command('backup-compact-s3 <bucketName> <dirName>')
|
.command('backup-s3-compact <bucketName> <dirName>')
|
||||||
.description('Compact a given backup to just one snapshot')
|
.description('Compact a given backup to just one snapshot')
|
||||||
.option('-f, --force', 'Force compact.', false)
|
.option('-f, --force', 'Force compact.', false)
|
||||||
.action(async (bucketName: string, dirName: string, cmd: { force: boolean, print: boolean }) => {
|
.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 })
|
ctx.error('no workspace', { workspace: workspace.name, email })
|
||||||
throw new PlatformError(new Status(Severity.ERROR, platform.status.Forbidden, {}))
|
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 () => {
|
void ctx.with('update-last-visit', {}, async () => {
|
||||||
await updateLastVisit(db, ws, account as Account)
|
await updateLastVisit(db, ws, account as Account)
|
||||||
})
|
})
|
||||||
|
@ -101,14 +101,17 @@ class BackupWorker {
|
|||||||
|
|
||||||
async schedule (ctx: MeasureContext): Promise<void> {
|
async schedule (ctx: MeasureContext): Promise<void> {
|
||||||
console.log('schedule timeout for', this.config.Interval, ' seconds')
|
console.log('schedule timeout for', this.config.Interval, ' seconds')
|
||||||
this.interval = setTimeout(() => {
|
this.interval = setTimeout(
|
||||||
if (this.backupPromise !== undefined) {
|
() => {
|
||||||
void this.backupPromise.then(() => {
|
if (this.backupPromise !== undefined) {
|
||||||
void this.triggerBackup(ctx)
|
void this.backupPromise.then(() => {
|
||||||
})
|
void this.triggerBackup(ctx)
|
||||||
}
|
})
|
||||||
void this.triggerBackup(ctx)
|
}
|
||||||
}, this.config.Interval * 1000)
|
void this.triggerBackup(ctx)
|
||||||
|
},
|
||||||
|
5 * 60 * 1000
|
||||||
|
) // Re-check every 5 minutes.
|
||||||
}
|
}
|
||||||
|
|
||||||
async backup (
|
async backup (
|
||||||
|
Loading…
Reference in New Issue
Block a user