fun startPolling()

in plugin/src/main/kotlin/toolbox/gateway/sample/EnvironmentRepository.kt [45:56]


  fun startPolling() {
    coroutineScope.launch(CoroutineName("EnvironmentRepository-Polling")) {
      // Initial fetch
      refreshEnvironments()

      // Periodic refresh
      while (isActive) {
        delay(refreshInterval)
        refreshEnvironments()
      }
    }
  }