Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Fix/trying to fix token holder zezo #431

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

Sotatek-DucPhung
Copy link
Collaborator

MET-2230 trying to fix token info zezo
@fabianbormann after deep debugging i would provide a fix version with:

@Param("startIdent") Long startIdent,
@Param("endIdent") Long endIdent,
@Param("txId") Long txId);
"select distinct addressTxAmount.unit "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use block statements and Uppercase keywords for better readability.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment applies to all places where this is true

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank @Kammerlo, updated

@@ -56,7 +63,7 @@ public void refreshAggBalanceAddressTx() {
System.currentTimeMillis() - currentTime);
}

@Scheduled(fixedDelayString = "${jobs.agg-analytic.fixed-delay}")
@Scheduled(initialDelay = 10800000, fixedDelayString = "${jobs.agg-analytic.fixed-delay}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this starting three hours later?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question for all other scheduled jobs.

Copy link
Collaborator Author

@Sotatek-DucPhung Sotatek-DucPhung Jun 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refreshing the view will take time as it scans everything. I added an initial delay to avoid scheduler running in the same when we start the application.

But it seems like it's not the "true" way to handle it. So I just updated it to use a redis locking mechanism.

startIdent,
endIdent,
System.currentTimeMillis() - curTime);
curTime = System.currentTimeMillis();

var tokenVolume24hMap =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For readability I prefer not to use "var"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to ask, but where did you change it? I know refactoring of this "old" code isn't part of this PR, but I think improving the code quality is an ongoing process :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5e51097
Here you go.
I will refactor the "old" code in as eparate PR for next sprint, is this OK for you ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! Thank you very much. This will help on the long run!

@Sotatek-DucPhung Sotatek-DucPhung marked this pull request as draft July 25, 2024 07:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants