style: fix lint

This commit is contained in:
usbharu 2023-11-27 15:52:49 +09:00
parent c0dffe7c98
commit e5d1a8d4a6
4 changed files with 12 additions and 7 deletions

View File

@ -13,14 +13,12 @@ import org.springframework.web.context.request.RequestContextHolder
import org.springframework.web.context.request.ServletRequestAttributes
import java.net.URL
@RestController
class InboxControllerImpl(private val apService: APService) : InboxController {
@Suppress("TooGenericExceptionCaught")
override suspend fun inbox(
@RequestBody string: String
): ResponseEntity<Unit> {
val request = (requireNotNull(RequestContextHolder.getRequestAttributes()) as ServletRequestAttributes).request
val parseActivity = try {
@ -48,11 +46,14 @@ class InboxControllerImpl(private val apService: APService) : InboxController {
println(headers)
apService.processActivity(
string, parseActivity, HttpRequest(
string,
parseActivity,
HttpRequest(
URL(url + request.queryString.orEmpty()),
HttpHeaders(headers),
method
), headers
),
headers
)
} catch (e: Exception) {
LOGGER.warn("FAILED Process Activity $parseActivity", e)

View File

@ -1,3 +1,5 @@
@file:Suppress("Filename")
package dev.usbharu.hideout.core.domain.model.instance
@Suppress("ClassNaming")

View File

@ -23,8 +23,10 @@ class KJobMongoJobQueueWorkerService(private val mongoClient: MongoClient) : Job
}.start()
}
override fun <T, R : HideoutJob<T, R>> init(defines:
List<Pair<R, JobRegisterContext<R, JobContextWithProps<R>>.(R) -> KJobFunctions<R, JobContextWithProps<R>>>>) {
override fun <T, R : HideoutJob<T, R>> init(
defines:
List<Pair<R, JobRegisterContext<R, JobContextWithProps<R>>.(R) -> KJobFunctions<R, JobContextWithProps<R>>>>
) {
defines.forEach { job ->
kjob.register(job.first, job.second)
}

View File

@ -2,7 +2,7 @@ package dev.usbharu.hideout.core.service.job
import dev.usbharu.hideout.core.external.job.HideoutJob
interface JobProcessor<out T, out R : HideoutJob<T, R>> {
interface JobProcessor<in T, out R : HideoutJob<@UnsafeVariance T, R>> {
suspend fun process(param: @UnsafeVariance T)
fun job(): R
}