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