Skip to content

Commit

Permalink
Add deletion of historical daily database version
Browse files Browse the repository at this point in the history
  • Loading branch information
nullpointer0x00 committed Oct 27, 2023
1 parent 01fdc2f commit 490ccfb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SELECT 'Deleting from token_historical_daily dates after 8/23/2023' AS comment;

DELETE FROM token_historical_daily WHERE historical_timestamp > '2023-08-23 00:00:00';
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ class AsyncService(
startDate = latest.timestamp.minusDays(1)
}
val dlobRes = tokenService.getHistoricalFromDlob(startDate) ?: return
logger.info("Updating token historical data starting from $startDate with ${dlobRes.buy.size} buy record for roll-up.")
logger.info("Updating token historical data starting from $startDate with ${dlobRes.buy.size} buy records for roll-up.")

val baseMap = Interval(startDate, today)
.let { int -> generateSequence(int.start) { dt -> dt.plusDays(1) }.takeWhile { dt -> dt < int.end } }
Expand Down

0 comments on commit 490ccfb

Please sign in to comment.