Skip to content

Conversation

@gguuss
Copy link
Contributor

@gguuss gguuss commented Jan 5, 2018

No description provided.

@codecov
Copy link

codecov bot commented Jan 5, 2018

Codecov Report

Merging #545 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #545   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           1      1           
  Lines           3      3           
=====================================
  Hits            3      3

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5cb34c0...be80033. Read the comment docs.

"jsonwebtoken": "7.4.1",
"request": "2.82.0",
"uuid": "3.1.0"
"requestretry": "requestretry",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a SemVer number? e.g. 1.12.2, the latest version of the library.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switched.

console.log(`Getting config from URL: ${urlBase}`);

// Custom backoff functions
function retryNotSuccess (err, response, body) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a library that comes with these built-in? (Perhaps nodejs-repo-tools?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, switched to recommended library that uses built-in exponential backoff.

};

// Custom backoff functions
function retryNotSuccess (err, response, body) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto to below comment - can these come from a library?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, switched to recommended library that uses built-in exponential backoff.

Copy link
Contributor

@ace-n ace-n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once nits are fixed. 👍

// Send events for high-frequency updates, update state only occasionally.
const delayMs = argv.messageType === 'events' ? 1000 : 2000;
request.post(options, function (error, response, body) {
console.log(JSON.stringify(request));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intended?

const fs = require('fs');
const jwt = require('jsonwebtoken');
const request = require('requestretry');
const request = require('retry-request');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: can we name this something other than request (to avoid confusion with the library of the same name)? Maybe retryRequest?

return incomingHttpMessage.statusMessage !== 'OK';
}
};
console.log(JSON.stringify(request.RetryStrategies));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto - is this intended?

};
console.log(JSON.stringify(request.RetryStrategies));
request.get(options, function (error, response, body) {
request(options, function (error, response, body) {
Copy link
Contributor

@ace-n ace-n Jan 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: arrow function?

(Apply this comment throughout your PR if you decide to make any changes.)

@gguuss gguuss merged commit fbb2f8a into master Jan 9, 2018
@gguuss gguuss deleted the exponential-backoff branch February 26, 2018 19:13
ace-n pushed a commit that referenced this pull request Nov 16, 2022
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
ace-n pushed a commit that referenced this pull request Nov 17, 2022
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
ace-n pushed a commit that referenced this pull request Nov 17, 2022
ace-n pushed a commit that referenced this pull request Nov 17, 2022
ahrarmonsur pushed a commit that referenced this pull request Nov 17, 2022
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
ace-n pushed a commit that referenced this pull request Nov 17, 2022
ace-n pushed a commit that referenced this pull request Nov 17, 2022
ace-n pushed a commit that referenced this pull request Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants