Address Build Warnings and Cleanup (#707)

* Address build warnings and cleanup

* Actual name of who defined the protocol

* Remove uneeded detekt supression

* GraphQL Before-After cleanup

* Lint

* Cleanup unused functions

* Fix some discrepancies with the 1.5 source api and fix lang exception
This commit is contained in:
Mitchell Syer
2023-10-15 20:16:30 -04:00
committed by GitHub
parent e70730e9a8
commit 682c364647
31 changed files with 151 additions and 278 deletions

View File

@@ -13,6 +13,7 @@ import io.javalin.websocket.WsContext
import io.javalin.websocket.WsMessageContext
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.FlowPreview
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.async
import kotlinx.coroutines.awaitAll
@@ -51,6 +52,7 @@ import kotlin.time.Duration.Companion.seconds
private val logger = KotlinLogging.logger {}
@OptIn(FlowPreview::class)
object DownloadManager {
private val scope = CoroutineScope(SupervisorJob() + Dispatchers.Default)
private val clients = ConcurrentHashMap<String, WsContext>()
@@ -150,9 +152,6 @@ object DownloadManager {
if (immediate) {
sendStatusToAllClients()
}
/*if (downloadChapter != null) { TODO GRAPHQL
downloadSubscriptionSource.publish(downloadChapter)
}*/
}
private fun getStatus(): DownloadStatus {

View File

@@ -12,6 +12,7 @@ fun interface FileDownload0Args : FileDownload {
}
}
@Suppress("UNCHECKED_CAST")
fun interface FileDownload3Args<A, B, C> : FileDownload {
suspend fun execute(
a: A,

View File

@@ -14,6 +14,7 @@ fun interface RetrieveFile0Args : RetrieveFile {
}
}
@Suppress("UNCHECKED_CAST")
fun interface RetrieveFile1Args<A> : RetrieveFile {
fun execute(a: A): Pair<InputStream, String>