fix: 不要なトランザクション宣言を削除

This commit is contained in:
usbharu 2023-12-06 20:46:20 +09:00
parent b3bbefb543
commit 5da03cf200
1 changed files with 12 additions and 12 deletions

View File

@ -99,22 +99,22 @@ class InboxJobProcessor(
val verify = signature?.let { verifyHttpSignature(httpRequest, it, transaction) } ?: false val verify = signature?.let { verifyHttpSignature(httpRequest, it, transaction) } ?: false
transaction.transaction {
logger.debug("Is verifying success? {}", verify)
val activityPubProcessor = logger.debug("Is verifying success? {}", verify)
activityPubProcessorList.firstOrNull { it.isSupported(param.type) } as ActivityPubProcessor<Object>?
if (activityPubProcessor == null) { val activityPubProcessor =
logger.warn("ActivityType {} is not support.", param.type) activityPubProcessorList.firstOrNull { it.isSupported(param.type) } as ActivityPubProcessor<Object>?
throw IllegalStateException("ActivityPubProcessor not found.")
}
val value = objectMapper.treeToValue(jsonNode, activityPubProcessor.type()) if (activityPubProcessor == null) {
activityPubProcessor.process(ActivityPubProcessContext(value, jsonNode, httpRequest, signature, verify)) logger.warn("ActivityType {} is not support.", param.type)
throw IllegalStateException("ActivityPubProcessor not found.")
logger.info("SUCCESS Process inbox. type: {}", param.type)
} }
val value = objectMapper.treeToValue(jsonNode, activityPubProcessor.type())
activityPubProcessor.process(ActivityPubProcessContext(value, jsonNode, httpRequest, signature, verify))
logger.info("SUCCESS Process inbox. type: {}", param.type)
} }
override fun job(): InboxJob = InboxJob override fun job(): InboxJob = InboxJob