source: bus-n-go-pavel-216049/bus-n-go-backend/src/main/kotlin/mk/ukim/finki/busngobackend/tasks/RefreshMaterializedViews.kt

Last change on this file was baf4cc4, checked in by ppaunovski <paunovskipavel@…>, 3 months ago

split group project and individual project into two separate folders

  • Property mode set to 100644
File size: 667 bytes
Line 
1package mk.ukim.finki.busngobackend.tasks
2
3import mk.ukim.finki.busngobackend.service.MaterializedViewService
4import org.springframework.scheduling.annotation.Scheduled
5import org.springframework.stereotype.Service
6
7@Service
8class RefreshMaterializedViews(
9 private val materializedViewService: MaterializedViewService,
10) {
11 @Scheduled(fixedRateString = "\${materialized.view.refresh.rate}")
12 fun refreshMaterializedViewTask() {
13 materializedViewService.refreshAverageTimeDiffs()
14 materializedViewService.refreshCommutesByHour()
15 materializedViewService.refreshFinesPerLine()
16 materializedViewService.refreshTotalIncome()
17 }
18}
Note: See TracBrowser for help on using the repository browser.