-
Notifications
You must be signed in to change notification settings - Fork 2
Fix/trying to fix token holder zezo #431
base: main
Are you sure you want to change the base?
Conversation
@Param("startIdent") Long startIdent, | ||
@Param("endIdent") Long endIdent, | ||
@Param("txId") Long txId); | ||
"select distinct addressTxAmount.unit " |
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.
Please use block statements and Uppercase keywords for better readability.
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.
Comment applies to all places where this is true
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.
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}") |
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.
Why is this starting three hours later?
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.
Same question for all other scheduled jobs.
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.
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 = |
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.
For readability I prefer not to use "var"
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.
Updated
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.
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 :)
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.
5e51097
Here you go.
I will refactor the "old" code in as eparate PR for next sprint, is this OK for you ?
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.
Sure! Thank you very much. This will help on the long run!
(token_tx_count, stake_address_tx_count, address_tx_count, latest_token_balance)
…id scheduler "hitting" database in the same time
MET-2230 trying to fix token info zezo
@fabianbormann after deep debugging i would provide a fix version with:
-> change to count distinct stake-address and payment-address