Browse Source

fix: remove unnecessary logic

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/5954/head
mertmit 1 year ago
parent
commit
acb0f8a6e8
  1. 5
      packages/nocodb/src/modules/jobs/jobs/at-import/helpers/readAndProcessData.ts

5
packages/nocodb/src/modules/jobs/jobs/at-import/helpers/readAndProcessData.ts

@ -293,13 +293,10 @@ export async function importLTARData({
await new Promise((resolve) => {
const promises = [];
const readable = allData.getStream();
let activeProcess = 0;
let tempCount = 0;
readable.on('data', async (record) => {
promises.push(
new Promise(async (resolve) => {
activeProcess++;
if (activeProcess >= BULK_PARALLEL_PROCESS) readable.pause();
const { id: _atId, ...rec } = record;
// todo: use actual alias instead of sanitized
@ -344,8 +341,6 @@ export async function importLTARData({
}
tempCount = 0;
}
activeProcess--;
if (activeProcess < BULK_PARALLEL_PROCESS) readable.resume();
resolve(true);
}),
);

Loading…
Cancel
Save