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

Add is-indexer event that fires immediately #155

Merged
merged 11 commits into from
Jun 14, 2024
Merged

Conversation

chm-diederichs
Copy link
Contributor

Also changes base.isIndexer to be updated immediately after applied change

@chm-diederichs chm-diederichs changed the title Add isIndexer event that fires immediately Add is-indexer event that fires immediately Jun 14, 2024
index.js Outdated
@@ -2013,6 +2030,27 @@ module.exports = class Autobase extends ReadyResource {
return false
}

_checkLocalIndexerUpdate () {
if (!this.localWriter) return
Copy link
Contributor

Choose a reason for hiding this comment

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

mb also check .localWriter.isActiveIndexer === .isIndexer and return to avoid the loop below in 99% of cases

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok updated to skip if we are not expecting a removal, but i don't think the above check would work, cause when they are both false the event won't fire

@chm-diederichs chm-diederichs merged commit 95cf0f2 into main Jun 14, 2024
4 checks passed
@chm-diederichs chm-diederichs deleted the is-indexer-event branch June 14, 2024 19:19
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.

2 participants