mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #2495 from omnivore-app/feature/importer-limit
limit import to 20k urls
This commit is contained in:
commit
1d0946d4bf
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