Chunked duplicate check to prevent postgres stack depth errors.
This commit is contained in:
@@ -232,7 +232,7 @@ function actors(release) {
|
||||
}
|
||||
|
||||
async function fetchLatest(entity, page, options) {
|
||||
return Promise.all(Array.from({ length: 100 }, async (value, index) => {
|
||||
return Promise.all(Array.from({ length: 10000 }, async (value, index) => {
|
||||
const release = {};
|
||||
|
||||
release.entryId = nanoid();
|
||||
@@ -262,7 +262,7 @@ async function fetchLatest(entity, page, options) {
|
||||
.select('name')
|
||||
.where('priority', '>', 7)
|
||||
.orderByRaw('random()')
|
||||
.limit(faker.random.number({ min: 2, max: 15 }))
|
||||
.limit(faker.datatype.number({ min: 2, max: 15 }))
|
||||
.pluck('name');
|
||||
|
||||
release.actors = [...actors(release), null]; // include empty actor to ensure proper handling
|
||||
|
||||
Reference in New Issue
Block a user