-
Notifications
You must be signed in to change notification settings - Fork 45
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 ddo states #959
add ddo states #959
Conversation
aquarius/app/state.py
Outdated
else: | ||
conditions = [] | ||
if chain_id: | ||
conditions.append({"term": {"chain_id": chain_id}}) |
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.
how about adding the match
one separately, then doing for k in ["chain_id", "did", "conditions"]: if locals[k]: conditions.append("term": {k: locals()[k]}
easier to read
Ref: https://www.programiz.com/python-programming/methods/built-in/locals
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.
it will not work. for some, you have "term". for some (as nft), you have "match". so we will end up with bunch of ifs inside loop
* refactor main loop * optimize more * fix test * optimize more & better logic for failures * better comment * remove log * use exists to speed up transferOwnership * force pytest versions * fix tests * optimize more * optimize more * fix test * lint * fix test logic * fix test logic * log level change * add logs * more logs * clean up receipt warnings * add more comments, optimize code * use es.exists instead of es.read * revert 607dfb1 * split logs for one block flow * fix typo * make function names more descriptive * new retry queue (#940) * new retry queue * Feature/new transfer ownership (#943) * new nft transfer monitoring * use custom subgraph version * fix typo * fix tests * remove commented transfer data * fix non-condition * fix duplicate code * fix typo * remove custom barge * use ve_allocate_realtime instead of ve_allocate (#939) * Upgrade to ES 8.5.1 (#944) * Initial commit for upgrading to ES 8. * Remove ocurrences of doc_type. * Black fix. * Upgrade GH Action to use proper es. * Fix some tests. * Fix query endpoint. * Fix black. * Fix doc type conflicts. * Remove config object. (#945) * Remove config object. * Black and test fixes. * Fix multiple issues (#932 , #924 , #933) (#951) * fix annoying es transport logs * fix decryptor not auth * improve logging * fix logging * fix blank * improve graphql error handling * fix test * fix #933 * add minLenghts (#952) * fix es 8.5 * make chunk_size 5k by default * remove es, since we have it in barge * use proper schema * do things in parallel * customize EVENTS_MONITOR_SLEEP_TIME * add multiple timers * update loglevel * handle non-existant metadatastate changes * add timers info * fix test * fix log statement * fix search * fix query * more es8.5 updates * fix TokenURIUpdatedProcessor * lint * proper use of timeout for requests * use timeouts for requests * more logs for error queue * make sure that did is using checksum addrs * fix failing code by removing it :) * fix tests * fix tests * Feature/retry queue max hold (#960) * add retry queue max hold * add test * fix code * fixes * add ddo states (#959) * add ddo states * wait for es when deleting elements Co-authored-by: Călina Cenan <[email protected]>
Closes #958
A state object looks like:
Intresting results:
curl http://172.15.0.5:5000/api/aquarius/state/ddo?did=did:op:9c1235050bcd51c8ec9a7058110102c9595136834911c315b4f739bc9a880b8e
curl http://172.15.0.5:5000/api/aquarius/state/ddo?nft=0xC7ED00725AAb7E679fCB46C9620115fE0B6dD94a
curl http://172.15.0.5:5000/api/aquarius/state/ddo?did=did:op:0d14bbdca68bea8c82f9a7987dbd87e2dc5dd50f7ece97b124c734e4e39583ac
curl http://172.15.0.5:5000/api/aquarius/state/ddo?did=did:op:ab85ad7b020b37daa6b7b05be6e82d0dcf89a3365274826c5b42c40395380375