Skip to content

Commit 257c2b6

Browse files
Merge pull request #10 from spidasoftware/increase-retry-wait-time-166214942
[#166214942] Increase retry wait time
2 parents 9dbefc3 + 0e25e19 commit 257c2b6

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

cmds/get.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,11 @@ module.exports = {
9595
const output = api.resolveOutputPath(argv.output);
9696
return mkdirp(output).then(() =>
9797
Promise.all(jobs.map(job => {
98-
const name = ((!argv.id && job.externalId) || job.id) + '.json';
98+
const name = ((!argv.id && job.externalId) || job.id);
99+
100+
if (!name.endsWith('.json')) {
101+
name = name + '.json';
102+
}
99103

100104
return fs.writeFileAsync(path.join(output,name),JSON.stringify(argv.strip ? job.payload : job));
101105
}))

lib/retrier.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const Promise = require('bluebird');
44
const request = Promise.promisify(require('request'));
55

66
const REQUEST_RETRY_COUNT = 5;
7-
const RETRY_TIMEOUT_MS = 5000;
7+
const RETRY_TIMEOUT_MS = 30000;
88
const REQUEST_TIMEOUT_MS = 60000;
99

1010
function rejectDelay() {
@@ -28,4 +28,4 @@ function requestAndRetry(requestParams, responseHandler = (response) => response
2828

2929
module.exports = {
3030
requestAndRetry
31-
};
31+
};

0 commit comments

Comments
 (0)