Skip to content

Commit

Permalink
add tmp fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nullpointer0x00 committed Oct 27, 2023
1 parent ec16953 commit cdf6c47
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,12 @@ class AsyncService(
@Scheduled(cron = "0 0 1 * * ?") // Every day at 1 am
fun updateTokenHistorical() {
val today = DateTime.now().startOfDay()
var startDate = today.minusMonths(1)
val latest = TokenHistoricalDailyRecord.getLatestDateEntry()
if (latest != null) {
startDate = latest.timestamp.minusDays(1).startOfDay()
}
// var startDate = today.minusMonths(1)
// val latest = TokenHistoricalDailyRecord.getLatestDateEntry()
// if (latest != null) {
// startDate = latest.timestamp.minusDays(1).startOfDay()
// }
val startDate = DateTime(2023, 8, 4, 0, 0, 0).startOfDay()
val dlobRes = tokenService.getHistoricalFromDlob(startDate) ?: return
logger.info("Updating token historical data starting from $startDate with ${dlobRes.buy.size} buy records for roll-up.")

Expand Down

0 comments on commit cdf6c47

Please sign in to comment.