-
Notifications
You must be signed in to change notification settings - Fork 14
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
Handled MetadataState event. #135
Conversation
0c29cbe
to
f4c6d43
Compare
Also i think it's good that you added lots of logs but maybe we should remove the duplicated ones, so maybe worth taking a look and clear some of the logs, this optional tho |
There are no duplicates as far as I saw, but I filtered some of them. If you still want to delete some, please specify here which. Thanks! |
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.
Still not sure if we need that new instance of database in the event processor, in the PR we are using that to get the get the DDO and the other instance from indexer main thread to save or update the DDO.
So i think we need to decide how we are going fwd with the database instance singleton or not and keep just one approach, in this case if singleton use the db only from indexer main thread otherwise do anything related to the db in the working threads.
As @paulo-ocean mentioned, this shouldn't be a show stopper. I decided to instantiate a new Database object to the event processor (for the moment I put only in metadata state, but we can declare it globally in that file as config was). If not, I've seen this message of yours @bogdanfazakas:
Can you give more details about this approach, please? |
I agree with paulo's comment on the DB, creating a new instance shouldn't necessarily be a showstopper
|
Created issue for additional comments that could be tackled after the POC: #149 |
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.
The concerns mentioned above have been moved to separate issues, so we can proceed to merge this PR and deal with them separately.
Fixes #46 .
Changes proposed in this PR:
Indexer/index.ts