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 an adaptor to es_objects and template function to reduce code #1429

Merged
merged 4 commits into from Dec 19, 2018

Conversation

Projects
3 participants
@oxarbitrage
Copy link
Member

commented Nov 10, 2018

The following pull request is an attempt to reduce the amount of code in the es_objects plugin and make it easier to add new objects. It uses an adaptor approach very similar to the one used in elasticsearch plugin for account history, this time for objects.

I think more can be done, specifically there is duplicated code in index_database function that i tried to reduce however i was not able to make it due to casting, types, etc.

I opted on submitting this changes as i think they go in the right direction, as i don't know exactly when i will have the time to work on this again i preferred to submit what i have now and don't let the code lost.

This is a refactor, users can continue using this plugin the same way they were doing before without changes in the options however i am considering it will be better to add the objects the user want to save in a vector instead of individual options for each as it is now.

In initial testings i was able to sync without any error up to 2016-05-10T02:10:30 with everything turned on(all objects) with command:

./programs/witness_node/witness_node --plugins "es_objects" --es-objects-proposals "true" --es-objects-accounts "true" --es-objects-assets "true" --es-objects-balances "true" --es-objects-limit-orders "true" --es-objects-asset-bitasset "true"
@pmconrad
Copy link
Contributor

left a comment

Looks like an improvement.
Haven't tested it myself, but it's an experimental plugin so if it works for you it should be ok.

@oxarbitrage

This comment has been minimized.

Copy link
Member Author

commented Dec 19, 2018

thank you @pmconrad

@oxarbitrage oxarbitrage merged commit 5c7fd22 into bitshares:develop Dec 19, 2018

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
ci/dockercloud Your tests passed in Docker Cloud
Details

@abitmore abitmore added this to In progress in Feature Release (201902) via automation Jan 1, 2019

@abitmore abitmore added this to the 201901 - Feature Release milestone Jan 1, 2019

@abitmore abitmore moved this from In progress to Done in Feature Release (201902) Jan 1, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.