Skip to content

Commit

Permalink
feature/added RabbitMQ -tweaked code--step15
Browse files Browse the repository at this point in the history
  • Loading branch information
hongwei1 committed Oct 15, 2024
1 parent 3cbe6c0 commit 5192eef
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -460,10 +460,8 @@ object LocalMappedConnector extends Connector with MdcLoggable {
hashOfSuppliedAnswer: String,
callContext: Option[CallContext]
) = Future {
Future {
val userId = callContext.map(_.user.map(_.userId).openOrThrowException(s"$UserNotLoggedIn Can not find the userId here."))
(Challenges.ChallengeProvider.vend.validateChallenge(challengeId, hashOfSuppliedAnswer, userId), callContext)
}
val userId = callContext.map(_.user.map(_.userId).openOrThrowException(s"$UserNotLoggedIn Can not find the userId here."))
(Challenges.ChallengeProvider.vend.validateChallenge(challengeId, hashOfSuppliedAnswer, userId), callContext)
}
override def validateChallengeAnswerC3(
transactionRequestId: Option[String],
Expand All @@ -488,10 +486,8 @@ object LocalMappedConnector extends Connector with MdcLoggable {
suppliedAnswerType: SuppliedAnswerType.Value,
callContext: Option[CallContext]
) = Future {
Future {
val userId = callContext.map(_.user.map(_.userId).openOrThrowException(s"$UserNotLoggedIn Can not find the userId here."))
(Challenges.ChallengeProvider.vend.validateChallenge(challengeId, suppliedAnswer, userId), callContext)
}
val userId = callContext.map(_.user.map(_.userId).openOrThrowException(s"$UserNotLoggedIn Can not find the userId here."))
(Challenges.ChallengeProvider.vend.validateChallenge(challengeId, suppliedAnswer, userId), callContext)
}

override def validateChallengeAnswerC5(
Expand All @@ -503,10 +499,8 @@ object LocalMappedConnector extends Connector with MdcLoggable {
suppliedAnswerType: SuppliedAnswerType.Value,
callContext: Option[CallContext]
) = Future {
Future {
val userId = callContext.map(_.user.map(_.userId).openOrThrowException(s"$UserNotLoggedIn Can not find the userId here."))
(Challenges.ChallengeProvider.vend.validateChallenge(challengeId, suppliedAnswer, userId), callContext)
}
val userId = callContext.map(_.user.map(_.userId).openOrThrowException(s"$UserNotLoggedIn Can not find the userId here."))
(Challenges.ChallengeProvider.vend.validateChallenge(challengeId, suppliedAnswer, userId), callContext)
}

override def getChallengesByTransactionRequestId(transactionRequestId: String, callContext: Option[CallContext]): OBPReturnType[Box[List[ChallengeTrait]]] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import java.util.{Date, TimeZone}
import scala.collection.mutable.ArrayBuffer

/**
* create ms sql server stored procedure according messageDocs.
* create the adapter side, using obp mapped connector to return the value
*/
object AdapterStubBuilder {
specialMethods // this line just for modify "MappedWebUiPropsProvider"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ object RabbitMQConnectionPoolTest extends App {
} finally {
// Close the channel and return the connection to the pool
channel.close()
// RabbitMQConnectionPool.returnConnection(connection)
RabbitMQConnectionPool.returnConnection(connection)
}
}

Expand Down

0 comments on commit 5192eef

Please sign in to comment.