Skip to content

Commit

Permalink
fix:jobs reloading while workflow is running
Browse files Browse the repository at this point in the history
  • Loading branch information
cunla committed Apr 24, 2024
1 parent 1e3cd22 commit 831e14c
Showing 1 changed file with 13 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,20 @@ open class DataProvider<T>(
}

private fun processRequest(): CompletableFuture<T> {
return ProgressManager.getInstance()
.submitIOTask(ProgressIndicatorsProvider(), true) {
try {
LOG.info("Executing ${githubApiRequest.url}")
val request = githubApiRequest
val response = requestExecutor.execute(it, request)
response
} catch (e: GithubStatusCodeException) {
LOG.warn("Error when getting $githubApiRequest.url: status code ${e.statusCode}: ${e.message}")
throw e
} catch (ioe: IOException) {
LOG.warn("Error when getting $githubApiRequest.url: $ioe")
throw ioe
}
return ProgressManager.getInstance().submitIOTask(ProgressIndicatorsProvider(), true) {
try {
LOG.info("Executing ${githubApiRequest.url}")
val request = githubApiRequest
val response = requestExecutor.execute(it, request)
response
} catch (e: GithubStatusCodeException) {
LOG.warn("Error when getting $githubApiRequest.url: status code ${e.statusCode}: ${e.message}")
throw e
} catch (ioe: IOException) {
LOG.warn("Error when getting $githubApiRequest.url: $ioe")
throw ioe
}
}
}

interface DataProviderChangeListener : EventListener {
Expand Down

0 comments on commit 831e14c

Please sign in to comment.