mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
limit import to 20k urls
This commit is contained in:
parent
3cfd390346
commit
fc7a649566
1 changed files with 6 additions and 0 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue