-
Notifications
You must be signed in to change notification settings - Fork 25
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
Conversation
isIndexer
event that fires immediatelyis-indexer
event that fires immediately
7c44779
to
1d5f0c9
Compare
index.js
Outdated
@@ -2013,6 +2030,27 @@ module.exports = class Autobase extends ReadyResource { | |||
return false | |||
} | |||
|
|||
_checkLocalIndexerUpdate () { | |||
if (!this.localWriter) return |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
Also changes
base.isIndexer
to be updated immediately after applied change