Fix: persist PSI indices after building them - #4
Open
mpont91 wants to merge 1 commit into
Open
Conversation
run_psi_index_building() called build_index() but never save_index(), so aware_psi_index stayed empty. The Java fund services found no constituents and the mirror funds copied nothing. Empty indices are skipped so a failed build doesn't wipe a good one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
run_psi_index_building()inrun_all.pycallsbuilder.build_index()but neverbuilder.save_index(), which exists inpsi_index.py. The indices are built in memory, logged, and dropped.As a result
polybot.aware_psi_indexstays empty, and the strategy service logs this every second without ever copying a trade:Empty indices are skipped so a build that finds no eligible traders does not wipe a previously good index (
save_indexdeletes before inserting).Verified locally: truncated the table, ran the job, and it repopulated on its own (102 rows across 6 indices). The mirror funds then started copying — 116 paper orders across PSI-10, PSI-25, PSI-ALPHA and PSI-SPORTS.