diff --git a/packages/Manager/src/main/kotlin/nz/govt/eop/tasks/PlanLimitsManifestUpdater.kt b/packages/Manager/src/main/kotlin/nz/govt/eop/tasks/PlanLimitsManifestUpdater.kt index 59cbda81..21293b5e 100644 --- a/packages/Manager/src/main/kotlin/nz/govt/eop/tasks/PlanLimitsManifestUpdater.kt +++ b/packages/Manager/src/main/kotlin/nz/govt/eop/tasks/PlanLimitsManifestUpdater.kt @@ -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") } } } diff --git a/packages/Manager/src/test/kotlin/nz/govt/eop/plan_limits/ControllerIntegrationTest.kt b/packages/Manager/src/test/kotlin/nz/govt/eop/plan_limits/ControllerIntegrationTest.kt index 12737305..5113c555 100644 --- a/packages/Manager/src/test/kotlin/nz/govt/eop/plan_limits/ControllerIntegrationTest.kt +++ b/packages/Manager/src/test/kotlin/nz/govt/eop/plan_limits/ControllerIntegrationTest.kt @@ -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)