Merge pull request #2495 from omnivore-app/feature/importer-limit

limit import to 20k urls
This commit is contained in:
Hongbo Wu 2023-07-18 10:30:58 +08:00 committed by GitHub
commit 1d0946d4bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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)