Skip to content

Commit

Permalink
fix: set settings on bootstrap when we start
Browse files Browse the repository at this point in the history
  • Loading branch information
Haroenv committed Aug 11, 2018
1 parent 0734436 commit e35c0d1
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,11 @@ async function bootstrap(state) {
const { taskID } = await client.deleteIndex(c.bootstrapIndexName);
await bootstrapIndex.waitTask(taskID);
log.info('⛷ Bootstrap: starting from the first doc');
return (
npm
.info()
// first time this launches, we need to remember the last seq our bootstrap can trust
.then(({ seq }) =>
stateManager.save({
seq,
})
)
.then(() => loop(state.bootstrapLastId))
);
const { seq } = await npm.info();
// first time this launches, we need to remember the last seq our bootstrap can trust
await stateManager.save({ seq });
await setSettings(bootstrapIndex);
return loop(state.bootstrapLastId);
}

function loop(lastId) {
Expand Down

0 comments on commit e35c0d1

Please sign in to comment.