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

fix: persist cores #85

Merged
merged 4 commits into from
Mar 7, 2023
Merged

fix: persist cores #85

merged 4 commits into from
Mar 7, 2023

Conversation

gmaclennan
Copy link
Member

@gmaclennan gmaclennan commented Mar 2, 2023

Persist cores that are added to the core manager. Fixes #86

Todo:

  • Add coreManager.close() method
  • Load and open persisted cores from storage.

@gmaclennan gmaclennan marked this pull request as ready for review March 3, 2023 12:44
Copy link
Contributor

@sethvincent sethvincent left a comment

Choose a reason for hiding this comment

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

👍 looks cool!

The only thing I was confused by was moving the CREATE_SQL and addCoreSqlStmt to core-manager/index.js. It seemed like having them in core-index.js was a good separation. Not really a big deal though if the CoreIndex class is internal to CoreManager.

@gmaclennan
Copy link
Member Author

Yeah, I did not like that either. Because events need to be added to cores loaded from persistence (which happens in the parent class) it became a very leaky abstraction to keep the persistence in the index. Couldn't figure out a neat way to separate it, but yeah, it's not pretty but it works

@gmaclennan gmaclennan merged commit ee8beea into main Mar 7, 2023
@gmaclennan gmaclennan deleted the fix/core-persistence branch August 31, 2023 06:41
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.

bug: persisted cores are not loaded
2 participants