Skip to content

Commit

Permalink
feat(timeout/retry): increase timeout/retry size, add options to conf…
Browse files Browse the repository at this point in the history
…igure them (#175)
  • Loading branch information
matthew-contentful authored Sep 19, 2019
1 parent 1e49a2c commit 179a545
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
10 changes: 10 additions & 0 deletions lib/cmds/space_cmds/export.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ export const builder = function (yargs) {
type: 'boolean',
default: false
})
.option('timeout', {
describe: 'Timeout in milliseconds for API calls',
type: 'number',
default: 20000
})
.option('retry-limit', {
describe: 'How many times to retry before an operation fails',
type: 'number',
default: 10
})
.config('config', 'An optional configuration JSON file containing all the options for a single run')
.epilog('Copyright 2019 Contentful')
}
Expand Down
10 changes: 10 additions & 0 deletions lib/cmds/space_cmds/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ export const builder = (yargs) => {
describe: 'Proxy configuration in HTTP auth format: [http|https]://host:port or [http|https]://user:password@host:port',
type: 'string'
})
.option('timeout', {
describe: 'Timeout in milliseconds for API calls',
type: 'number',
default: 20000
})
.option('retry-limit', {
describe: 'How many times to retry before an operation fails',
type: 'number',
default: 10
})
.config('config', 'An optional configuration JSON file containing all the options for a single run')
.epilog('Copyright 2019 Contentful')
}
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@
"chalk": "^2.4.1",
"cli-table3": "^0.5.1",
"command-exists": "^1.2.7",
"contentful-export": "^7.6.0",
"contentful-import": "^7.5.1",
"contentful-management": "^5.9.0",
"contentful-migration": "^1.0.0",
"contentful-export": "^7.7.0",
"contentful-import": "^7.6.0",
"contentful-management": "^5.11.0",
"contentful-migration": "^0.19.3",
"emojic": "^1.1.11",
"execa": "^0.10.0",
"figlet": "^1.2.0",
Expand Down
8 changes: 8 additions & 0 deletions test/integration/cmds/space/__snapshots__/import.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ Options:
--proxy Proxy configuration in HTTP auth format:
[http|https]://host:port or
[http|https]://user:password@host:port [string]
--timeout Timeout in milliseconds for API calls
[number] [default: 20000]
--retry-limit How many times to retry before an operation fails
[number] [default: 10]
--config An optional configuration JSON file containing all
the options for a single run
Expand Down Expand Up @@ -55,6 +59,10 @@ Options:
--proxy Proxy configuration in HTTP auth format:
[http|https]://host:port or
[http|https]://user:password@host:port [string]
--timeout Timeout in milliseconds for API calls
[number] [default: 20000]
--retry-limit How many times to retry before an operation fails
[number] [default: 10]
--config An optional configuration JSON file containing all
the options for a single run
Expand Down

0 comments on commit 179a545

Please sign in to comment.