limit import to 20k urls

This commit is contained in:
Hongbo Wu
2023-07-17 18:09:13 +08:00
parent 3cfd390346
commit fc7a649566

View File

@ -54,6 +54,12 @@ export const importCsv = async (ctx: ImportContext, stream: Stream) => {
ctx.taskId,
ImportStatus.STARTED
)
// limit import to 20k urls
if (ctx.countImported + ctx.countFailed >= 20000) {
console.log('import limit reached')
break
}
} catch (error) {
console.log('invalid url', row, error)