Catch workspace issues in backfill upgrade commands
This commit is contained in:
@ -27,10 +27,16 @@ export class RecordPositionBackfillCommand extends ActiveWorkspacesCommandRunner
|
||||
workspaceIds: string[],
|
||||
): Promise<void> {
|
||||
for (const workspaceId of workspaceIds) {
|
||||
try {
|
||||
await this.recordPositionBackfillService.backfill(
|
||||
workspaceId,
|
||||
options.dryRun ?? false,
|
||||
);
|
||||
} catch (error) {
|
||||
this.logger.error(
|
||||
`Error backfilling record position for workspace ${workspaceId}: ${error}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,6 +34,7 @@ export class ViewGroupNoValueBackfillCommand extends ActiveWorkspacesCommandRunn
|
||||
workspaceIds: string[],
|
||||
): Promise<void> {
|
||||
for (const workspaceId of workspaceIds) {
|
||||
try {
|
||||
const viewRepository =
|
||||
await this.twentyORMGlobalManager.getRepositoryForWorkspace<ViewWorkspaceEntity>(
|
||||
workspaceId,
|
||||
@ -77,6 +78,11 @@ export class ViewGroupNoValueBackfillCommand extends ActiveWorkspacesCommandRunn
|
||||
viewGroupRepository,
|
||||
);
|
||||
}
|
||||
} catch (error) {
|
||||
this.logger.error(
|
||||
`Error backfilling view group no value for workspace ${workspaceId}: ${error}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user