Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(main): allow retries to be limited #3

Merged
merged 1 commit into from
Aug 20, 2015
Merged

feat(main): allow retries to be limited #3

merged 1 commit into from
Aug 20, 2015

Conversation

oliversalzburg
Copy link
Contributor

No description provided.

@oliversalzburg
Copy link
Contributor Author

Working on fixing the coverage. I already noticed problems as well. Will post an update soon.

@oliversalzburg
Copy link
Contributor Author

@voxpelli I think I need your help. husky prevents me from pushing, because jshint doesn't like the .jshintrc:

Running "lintspaces:files" (lintspaces) task
>> 3 lint free.

Running "jshint:files" (jshint) task
ERROR: Can't parse config file: .jshintrc
Error:SyntaxError: Unexpected token o

@oliversalzburg
Copy link
Contributor Author

Ah, got that solved. Those are supposed to be symlinks. Now it fails at a different spot:

Running "dependency-check:files" (dependency-check) task
Fatal error: Object.keys called on non-object

@oliversalzburg
Copy link
Contributor Author

I pushed with --no-verfiy tests are passing now. I would appreciate if you could have a look at everything. I'm not sure I fully understood the tests.

Let me know if I need to fix anything :)

@voxpelli
Copy link
Owner

@oliversalzburg Sorry for the dependency-check failure – I'm co-maintaining that module so would like to try and find out what the error was. Which Node are you running? Some 0.12 version r an io.js version?

@@ -18,6 +18,7 @@ var Retry = function (options) {
retryMin: 0,
retryBase: 1.2,
retryExponent: 33,
retryLimit: -1,
Copy link
Owner

Choose a reason for hiding this comment

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

Would prefer if the default was either false or undefined – more explicit about the intention of the value

@oliversalzburg
Copy link
Contributor Author

@voxpelli I'm on 0.12.7 on Windows 10

@oliversalzburg
Copy link
Contributor Author

@voxpelli Thanks for the review. New version is up :)

@voxpelli
Copy link
Owner

Looks like the dependency-check issue has been reported: dependency-check-team/dependency-check#30

@@ -76,6 +77,12 @@ Retry.prototype._try = function () {
self.retrying = undefined;
self.abort = undefined;


if (self.options.retryLimit > -1 && self.failures >= self.options.retryLimit) {
Copy link
Owner

Choose a reason for hiding this comment

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

This check also needs to be updated now that the default has changed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Jeeze, it's getting late :P Sorry for missing that.

voxpelli added a commit that referenced this pull request Aug 20, 2015
feat(main): allow retries to be limited
@voxpelli voxpelli merged commit 11c5c60 into voxpelli:master Aug 20, 2015
@oliversalzburg
Copy link
Contributor Author

Very cool :) I'll start working on voxpelli/node-pg-pubsub#6 again tomorrow at work. Thanks for the help!

@voxpelli
Copy link
Owner

Published as 0.2.3 – extended the tests a bit and as the result of that changed the code a bit as well. Also removed the .end() – not needed and slipped through my first review :)

@oliversalzburg
Copy link
Contributor Author

Interesting. I didn't understand the difference between end()ing and plain stopping :\

@oliversalzburg oliversalzburg deleted the feature/retry-limit branch August 20, 2015 20:38
@voxpelli
Copy link
Owner

Ending is for graceful and immediate shutdowns of applications, to ensure that no matter what happens nothing, not even a reset, will try to establish a new connection :)

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.

None yet

2 participants