Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

use write.writeImportant for session store #8593

Merged
merged 1 commit into from
May 2, 2017
Merged

Conversation

bridiver
Copy link
Collaborator

@bridiver bridiver commented May 1, 2017

fix #7876

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).

Test Plan:
quit/restart behavior when updating

@bbondy
Copy link
Member

bbondy commented May 2, 2017

++

@bridiver bridiver merged commit 87e4657 into master May 2, 2017
@bsclifton bsclifton deleted the session-store-save branch May 2, 2017 15:53
@luixxiul luixxiul added this to the 0.15.2 milestone May 2, 2017
Copy link
Member

@bsclifton bsclifton left a comment

Choose a reason for hiding this comment

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

++

}
return p
}

/**
* Clears all session cache.
* @return a promise that always resolves (called on app shutdon so must always)
Copy link
Member

Choose a reason for hiding this comment

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

should be updated; doesn't return a promise anymore

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yep, that's true for several of these now

for (let partition in registeredSessions) {
let ses = registeredSessions[partition]
p = p.then(promisify(ses.clearCache.bind(ses)).catch(() => {}))
setImmediate(ses.clearCache.bind(ses))
Copy link
Member

Choose a reason for hiding this comment

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

Since there are docs on the Muon side, I think it would be helpful to put a link to the docs as a comment; ex:
https://github.com/brave/muon/blob/master/docs/api/session.md#sesclearcachecallback

(and if needed, update the docs)

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.

When writing session to disk, ensure we do a flush
4 participants