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(process): redo bootstrap after X amount of time #40

Merged
merged 7 commits into from May 10, 2017

Conversation

Projects
None yet
3 participants
@Haroenv
Copy link
Member

Haroenv commented Apr 29, 2017

fixes #20

In the 'watch' step, I get the state after each iteration, then if now - last time bootstrap was done is more than the time to redo the bootstrap, the settings

stateManager.set({
  seq: 0,
  bootstrapDone: false,
});

are being set, which should make the bootstrap start over.

I am not very sure how to test this locally without having to wait a long time...

feat(process): redo bootstrap after X amount of time
fixes #20

In the 'watch' step, I get the state after each iteration, then if now - last time bootstrap was done is more than the time to redo the bootstrap, the settings

```js
stateManager.set({
  seq: 0,
  bootstrapDone: false,
});
```

are being set, which *should* make the bootstrap start over.

@Haroenv Haroenv requested a review from vvo Apr 29, 2017

index.js Outdated
stateManager.set({
seq: 0,
bootstrapDone: false,
});

This comment has been minimized.

@Haroenv

Haroenv Apr 29, 2017

Author Member

I’m doubting if I need .then(()=>exit(0)) is needed here as an escape-hatch

This comment has been minimized.

@redox

redox May 2, 2017

Member

What do you think @vvo?

This comment has been minimized.

@vvo

vvo May 9, 2017

Member

Where would you want to put that exit(0)?

index.js Outdated
@@ -104,6 +104,7 @@ function bootstrap(state) {
log.info('⛷ Bootstrap: done');
return stateManager.save({
bootstrapDone: true,
bootstrapLastDone: new Date().toISOString(),

This comment has been minimized.

@vvo

vvo May 9, 2017

Member

Isn't Date.now() sufficient (store as a timestamp)?

@Haroenv Haroenv merged commit cc51669 into master May 10, 2017

@Haroenv Haroenv deleted the feat/redo-replication branch May 10, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment