in src/main/kotlin/org/jetbrains/teamcity/github/controllers/PullRequestMergeBranchChecker.kt [70:92]
override fun run() {
if (!active) return
if (runningInLowPriorityPool.get()) {
// Still running or scheduled
schedule(myNormalExecutor)
return
}
runningInLowPriorityPool.set(true)
myLowPrioExecutor.execute {
try {
val retry = doCheck()
if (!retry) {
// Cleanup
myScheduledActions.remove(info, this)
} else {
// Retry
schedule(myNormalExecutor)
}
} finally {
runningInLowPriorityPool.set(false)
}
}
}