Skip to content

Commit

Permalink
Merge pull request #18 from usefulness/readme
Browse files Browse the repository at this point in the history
Fix releasing resources
  • Loading branch information
mateuszkwiecinski authored Mar 23, 2021
2 parents 58e8e43 + 6e89e70 commit 735fe91
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions issuechecker/src/main/kotlin/com/starter/issuechecker/Di.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import com.starter.issuechecker.resolvers.github.GithubService
import com.starter.issuechecker.resolvers.github.GithubStatusResolver
import com.starter.issuechecker.resolvers.youtrack.YoutrackService
import com.starter.issuechecker.resolvers.youtrack.YoutrackStatusResolver
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.asCoroutineDispatcher
import okhttp3.OkHttpClient
import retrofit2.Retrofit
import retrofit2.converter.moshi.MoshiConverterFactory
Expand All @@ -13,16 +13,14 @@ import java.util.concurrent.Executor
internal fun defaultChecker(
config: IssueChecker.Config
): DefaultChecker {
val dispatcher = Dispatchers.IO

val supportedTrackers = setOf(
createGithub(config),
createYoutrack(config)
createYoutrack(config),
)

return DefaultChecker(
supportedTrackers = supportedTrackers,
dispatcher = Dispatchers.IO
dispatcher = config.executor.asCoroutineDispatcher(),
)
}

Expand Down

0 comments on commit 735fe91

Please sign in to comment.