Skip to content

Commit

Permalink
Merge branch 'integration/prod' into integration_merge_branch
Browse files Browse the repository at this point in the history
  • Loading branch information
smozely committed Dec 6, 2023
2 parents 9dc8208 + 07f377e commit a01c93d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ import org.springframework.stereotype.Component
class PlanLimitsManifestUpdater(val context: DSLContext, val manifest: Manifest) {

private val logger = KotlinLogging.logger {}
@Scheduled(fixedDelay = 1, timeUnit = TimeUnit.MINUTES)

@Scheduled(fixedDelay = 5, timeUnit = TimeUnit.MINUTES)
@SchedulerLock(name = "planLimitsManifestUpdater")
fun updateManifest() {
logger.debug { startTaskMessage("planLimitsManifestUpdater") }
manifest.updateAll()
logger.debug { endTaskMessage("planLimitsManifestUpdater") }
logger.info { startTaskMessage("planLimitsManifestUpdater") }
// Hard coded to just Wellington until we have more data since empty results
// for individual queries cause errors
manifest.update(9)
logger.info { endTaskMessage("planLimitsManifestUpdater") }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ControllerIntegrationTest(@Autowired val mvc: MockMvc) {
}

@Test
fun `can load plann regions`() {
fun `can load plan regions`() {
mvc.perform(
get("/plan-limits/plan-regions?councilId=9").contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk)
Expand Down

0 comments on commit a01c93d

Please sign in to comment.