Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Conversation

@rmisio
Copy link
Contributor

@rmisio rmisio commented Aug 13, 2019

closes #1807

lastBlockchainResync[coinType] = (new Date()).getTime();
_server.save({ lastBlockchainResync })
.done(() => {
const serverSave = _server.save({ lastBlockchainResync });
Copy link
Contributor Author

@rmisio rmisio Aug 13, 2019

Choose a reason for hiding this comment

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

So the problem was that isjs was updated and it looks like it no longer considers localhost as a valid IP, so I had to manually add that condition to the model validation.

What happens is Model.save() returns false if validation fails as opposed to the jqXhr promise if it passes validation. So handling that case here. It really shouldn't ever fail validation unless it's something weird like this and if it does, it will now have better console output than the seemingly random exception that was being triggered before.

// If you change this, be sure to change anywhere in the GUI you may have output how
// long its unavailable.
const resyncInactiveTime = 1000 * 60 * 60 * 1; // 1 hour
const resyncInactiveTime = 1000 * 60;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since the server POST comes back immediately and independent of the actual blockchain resync process, I decided to leave a 1 minute inactive time in to at least limit the chance of concurrent server side calls being fired off.

@jjeffryes
Copy link
Contributor

@rmisio looks good to me, tests out fine. Are you ready for it to merge?

@rmisio
Copy link
Contributor Author

rmisio commented Aug 13, 2019

@jjeffryes yes, it's ready on my end.

@jjeffryes jjeffryes merged commit 484949b into master Aug 13, 2019
@jjeffryes jjeffryes deleted the 1807 branch August 13, 2019 22:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resync Bug

3 participants