Skip to content

Commit a1bfa79

Browse files
committed
Fix: sonar
1 parent ca802cd commit a1bfa79

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ sonar {
1111
}
1212

1313
tasks.register("copyJar") {
14+
description = "Copy jar to server location"
1415
group = "fardragi"
1516
dependsOn("build")
1617
doLast() {
@@ -27,6 +28,7 @@ tasks.register("copyJar") {
2728
}
2829

2930
tasks.register<Exec>("startServer") {
31+
description = "Run minecraft server"
3032
group = "fardragi"
3133
standardInput = System.`in`
3234
dependsOn("copyJar")

src/main/kotlin/com/fardragi/nyaruko/database/Extensions.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.fardragi.nyaruko.database
22

33
import com.fardragi.nyaruko.NyarukoLog
4+
import kotlinx.coroutines.CoroutineDispatcher
45
import kotlinx.coroutines.Dispatchers
56
import kotlinx.coroutines.withContext
67
import org.jetbrains.exposed.sql.SqlLogger
@@ -17,7 +18,7 @@ object CustomLogger : SqlLogger {
1718
}
1819
}
1920

20-
suspend fun <T> query(block: () -> T): T = withContext(Dispatchers.IO) {
21+
suspend fun <T> query(block: () -> T, dispatcher: CoroutineDispatcher = Dispatchers.IO): T = withContext(dispatcher) {
2122
transaction {
2223
addLogger(CustomLogger)
2324
block()

0 commit comments

Comments
 (0)