Skip to content

Commit

Permalink
Merge pull request #1149 from JupiterOne/delete-batch-logs
Browse files Browse the repository at this point in the history
Delete batch logs
  • Loading branch information
gastonyelmini authored Dec 19, 2024
2 parents d9f2d07 + ee5d5bd commit 0a1880b
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions packages/integration-sdk-runtime/src/synchronization/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { randomUUID as uuid } from 'crypto';
import { createEventPublishingQueue } from './events';
import { iterateParsedGraphFiles } from '..';
import { shrinkBatchRawData } from './shrinkBatchRawData';
import { batchGraphObjectsBySizeInBytes, getSizeOfObject } from './batchBySize';
import { batchGraphObjectsBySizeInBytes } from './batchBySize';
import type { Alpha } from '@lifeomic/alpha';

export { synchronizationApiError };
Expand Down Expand Up @@ -488,7 +488,6 @@ export async function uploadDataChunk<
},
'Uploading data...',
);
const startTime = Date.now();
try {
await apiClient.post(
`/persister/synchronization/jobs/${jobId}/${type as string}`,
Expand All @@ -507,30 +506,6 @@ export async function uploadDataChunk<
cleanAxiosError(err);
throw err;
}

const duration = Date.now() - startTime;
if (duration >= 10_000) {
logger.info(
{
uploadCorrelationId,
uploadType: type,
attemptNum: ctx.attemptNum,
batchSize: batch.length,
batchSizeInBytes: getSizeOfObject(batch),
uploadDuration: duration,
},
'Finished uploading big batch',
);
}
logger.debug(
{
uploadCorrelationId,
uploadType: type,
attemptNum: ctx.attemptNum,
batchSize: batch.length,
},
'Finished uploading batch',
);
},
{
maxAttempts: 5,
Expand Down

0 comments on commit 0a1880b

Please sign in to comment.