Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/remove-materialized…
Browse files Browse the repository at this point in the history
…-view' into remove-materialized-view
  • Loading branch information
dcshock committed Dec 31, 2024
2 parents 04e3d81 + a3a642a commit 9e096e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,8 @@ class TxMessageRecord(id: EntityID<Int>) : IntEntity(id) {

fun findByQueryForResults(txQueryParams: TxQueryParams) = transaction {
val query = findByQueryParams(txQueryParams, listOf(distId) + tableColSet)
.alias("subQuery") //create a subquery to delay sorting until after the distinct
.selectAll()
.orderBy(Pair(TxMessageTable.blockHeight, SortOrder.DESC))
.limit(txQueryParams.count, txQueryParams.offset.toLong())
TxMessageRecord.wrapRows(query).toSet()
Expand Down Expand Up @@ -451,6 +453,7 @@ class TxMessageRecord(id: EntityID<Int>) : IntEntity(id) {
query
}


fun buildInsert(txInfo: TxData, message: Any, msgIdx: Int) = transaction {
listOf(
0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class ScheduledTaskService(
}.start()
}

@Scheduled(initialDelay = 0L, fixedDelay = 300000L) // Every 5 minutes
@Scheduled(initialDelay = 0L, fixedDelay = 5000L)
fun updateLatestBlockHeightJob() {
val index = getBlockIndex()
val startHeight = blockService.getLatestBlockHeight()
Expand Down Expand Up @@ -211,7 +211,7 @@ class ScheduledTaskService(
@Scheduled(initialDelay = 0L, fixedDelay = 5000L)
fun updateSpotlight() = explorerService.createSpotlight()

@Scheduled(initialDelay = 0L, fixedDelay = 300000L) // Every 5 minutes
@Scheduled(initialDelay = 0L, fixedDelay = 5000L)
fun retryBlockTxs() {
logger.info("Retrying block/tx records")
BlockTxRetryRecord.getRecordsToRetry().map { height ->
Expand Down Expand Up @@ -263,7 +263,7 @@ class ScheduledTaskService(
tokenService.updateAndSaveTokenHistoricalData(startDate, today)
}

@Scheduled(initialDelay = 0L, fixedDelay = 600000L) // Every 5 minutes
@Scheduled(initialDelay = 0L, fixedDelay = 5000L)
fun updateTokenLatest() {
val today = DateTime.now().withZone(DateTimeZone.UTC)
val startDate = today.minusDays(1)
Expand Down Expand Up @@ -349,7 +349,7 @@ class ScheduledTaskService(
}
}

@Scheduled(initialDelay = 5000L, fixedDelay = 300000L) // Every 5 minutes
@Scheduled(initialDelay = 5000L, fixedDelay = 5000L)
fun startAccountProcess() {
processAccountRecords()
}
Expand Down

0 comments on commit 9e096e0

Please sign in to comment.