Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Remove chunks from importStatus table

Edward Cuiaf8f9894fd4e
diff --git a/server/src/db/postgres/schema.ts b/server/src/db/postgres/schema.ts
index 74b86d082..d409dda9c 100644
--- a/server/src/db/postgres/schema.ts
+++ b/server/src/db/postgres/schema.ts
@@ -277,8 +277,6 @@ export const importStatus = pgTable(
status: importStatusEnum("status").notNull().default("pending"),
totalRows: integer("total_rows"),
processedRows: integer("processed_rows").notNull().default(0),
- chunksCompleted: integer("chunks_completed").notNull().default(0),
- totalChunks: integer("total_chunks"),
errorMessage: text("error_message"),
startedAt: timestamp("started_at").notNull().defaultNow(),
completedAt: timestamp("completed_at"),
diff --git a/server/src/lib/importStatus.ts b/server/src/lib/importStatus.ts
index 11a2196a0..2ce7edf1a 100644
--- a/server/src/lib/importStatus.ts
+++ b/server/src/lib/importStatus.ts
@@ -24,19 +24,13 @@ export class ImportStatusManager {
static async updateProgress(
importId: string,
- chunksCompleted: number,
processedRows: number,
- totalChunks?: number,
totalRows?: number
): Promise<void> {
const updateData: Partial<InsertImportStatus> = {
- chunksCompleted,
processedRows,
};
- if (totalChunks !== undefined) {
- updateData.totalChunks = totalChunks;
- }
if (totalRows !== undefined) {
updateData.totalRows = totalRows;
}
diff --git a/server/src/workers/dataInsertWorker.ts b/server/src/workers/dataInsertWorker.ts
index e0c70840b..834db1f7a 100644
--- a/server/src/workers/dataInsertWorker.ts
+++ b/server/src/workers/dataInsertWorker.ts
@@ -32,7 +32,6 @@ export async function registerDataInsertWorker() {
await ImportStatusManager.updateProgress(
importId,
- chunkNumber,
transformedRecords.length
);