Add backfill position job by workspace (#5725)

- Removing existing listener that was backfilling created records
without position
- Switch to a job that backfill all objects within workspace
- Adapting `FIND_BY_POSITION` so it can fetch objects without position.
Currently we needed to input a number
This commit is contained in:
Thomas Trompette
2024-06-04 14:10:58 +02:00
committed by GitHub
parent b1f12d7257
commit 25f4e44aec
9 changed files with 307 additions and 104 deletions

View File

@ -6,8 +6,7 @@ import { RecordPositionBackfillService } from 'src/engine/api/graphql/workspace-
export type RecordPositionBackfillJobData = {
workspaceId: string;
objectMetadata: { nameSingular: string; isCustom: boolean };
recordId: string;
dryRun: boolean;
};
@Injectable()
@ -19,10 +18,6 @@ export class RecordPositionBackfillJob
) {}
async handle(data: RecordPositionBackfillJobData): Promise<void> {
this.recordPositionBackfillService.backfill(
data.workspaceId,
data.objectMetadata,
data.recordId,
);
this.recordPositionBackfillService.backfill(data.workspaceId, data.dryRun);
}
}