File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
src/main/kotlin/com/fardragi/nyaruko/database Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ sonar {
11
11
}
12
12
13
13
tasks.register(" copyJar" ) {
14
+ description = " Copy jar to server location"
14
15
group = " fardragi"
15
16
dependsOn(" build" )
16
17
doLast() {
@@ -27,6 +28,7 @@ tasks.register("copyJar") {
27
28
}
28
29
29
30
tasks.register<Exec >(" startServer" ) {
31
+ description = " Run minecraft server"
30
32
group = " fardragi"
31
33
standardInput = System .`in `
32
34
dependsOn(" copyJar" )
Original file line number Diff line number Diff line change 1
1
package com.fardragi.nyaruko.database
2
2
3
3
import com.fardragi.nyaruko.NyarukoLog
4
+ import kotlinx.coroutines.CoroutineDispatcher
4
5
import kotlinx.coroutines.Dispatchers
5
6
import kotlinx.coroutines.withContext
6
7
import org.jetbrains.exposed.sql.SqlLogger
@@ -17,7 +18,7 @@ object CustomLogger : SqlLogger {
17
18
}
18
19
}
19
20
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 ) {
21
22
transaction {
22
23
addLogger(CustomLogger )
23
24
block()
You can’t perform that action at this time.
0 commit comments