Allowing HTTP rate limits to be set by configuration or argument.

This commit is contained in:
DebaucheryLibrarian
2020-11-22 23:50:24 +01:00
parent 6a5063cf32
commit 3d427f7e1d
4 changed files with 54 additions and 17 deletions

View File

@@ -153,6 +153,16 @@ const { argv } = yargs
type: 'number',
default: 1,
})
.option('interval', {
describe: 'Minimum wait time between HTTP requests',
type: 'number',
// don't set default, because argument has to override config, but config has to override default
})
.option('concurrency', {
describe: 'Maximum amount of parallel HTTP requests',
type: 'number',
// don't set default, because argument has to override config, but config has to override default
})
.option('save', {
describe: 'Save fetched releases to database',
type: 'boolean',