Skip to content

Commit f5fa8ef

Browse files
committed
cleanup dup helper
1 parent 0464112 commit f5fa8ef

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

apps/sim/lib/execution/payloads/large-value-metadata.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
} from '@sim/db/schema'
99
import { createLogger } from '@sim/logger'
1010
import { and, eq, inArray, notInArray, sql } from 'drizzle-orm'
11+
import { chunkArray } from '@/lib/cleanup/batch-delete'
1112
import { collectLargeValueKeys } from '@/lib/execution/payloads/large-execution-value'
1213

1314
const logger = createLogger('LargeValueMetadata')
@@ -75,14 +76,6 @@ function parseLargeValueStorageKey(key: string): LargeValueStorageKeyParts | nul
7576
}
7677
}
7778

78-
function chunkArray<T>(items: T[], size: number): T[][] {
79-
const chunks: T[][] = []
80-
for (let index = 0; index < items.length; index += size) {
81-
chunks.push(items.slice(index, index + size))
82-
}
83-
return chunks
84-
}
85-
8679
function getBoundedUniqueKeys(keys: string[], label: string): string[] {
8780
const uniqueKeys = Array.from(new Set(keys))
8881
if (uniqueKeys.length > MAX_LARGE_VALUE_REFERENCES_PER_SCOPE) {

0 commit comments

Comments
 (0)