mirror of
https://github.com/VinylDNS/vinyldns
synced 2025-08-21 17:37:15 +00:00
removed future await and increased akka http timeout limit
This commit is contained in:
parent
cb122b1506
commit
59fd320a5a
@ -350,6 +350,7 @@ akka.http {
|
||||
# The time period within which the TCP binding process must be completed.
|
||||
# Set to `infinite` to disable.
|
||||
bind-timeout = 5s
|
||||
request-timeout = 60s
|
||||
|
||||
# Show verbose error messages back to the client
|
||||
verbose-error-messages = on
|
||||
|
@ -347,6 +347,7 @@ akka.http {
|
||||
# The time period within which the TCP binding process must be completed.
|
||||
# Set to `infinite` to disable.
|
||||
bind-timeout = 5s
|
||||
request-timeout = 60s
|
||||
|
||||
# Show verbose error messages back to the client
|
||||
verbose-error-messages = on
|
||||
|
@ -366,6 +366,7 @@ akka.http {
|
||||
# The time period within which the TCP binding process must be completed.
|
||||
# Set to `infinite` to disable.
|
||||
bind-timeout = 5s
|
||||
request-timeout = 60s
|
||||
|
||||
# Show verbose error messages back to the client
|
||||
verbose-error-messages = on
|
||||
|
@ -351,6 +351,7 @@ akka.http {
|
||||
# The time period within which the TCP binding process must be completed.
|
||||
# Set to `infinite` to disable.
|
||||
bind-timeout = 5s
|
||||
request-timeout = 60s
|
||||
|
||||
# Show verbose error messages back to the client
|
||||
verbose-error-messages = on
|
||||
|
@ -990,6 +990,7 @@ dotted-hosts = {
|
||||
# The time period within which the TCP binding process must be completed.
|
||||
# Set to `infinite` to disable.
|
||||
bind-timeout = 5s
|
||||
request-timeout = 60s
|
||||
|
||||
# Show verbose error messages back to the client
|
||||
verbose-error-messages = on
|
||||
|
@ -29,10 +29,6 @@ import vinyldns.core.protobuf.{BatchChangeProtobufConversions, SingleChangeType}
|
||||
import vinyldns.core.route.Monitored
|
||||
import vinyldns.proto.VinylDNSProto
|
||||
|
||||
import scala.concurrent.ExecutionContext.Implicits.global
|
||||
import scala.concurrent.duration.DurationInt
|
||||
import scala.concurrent.{Await, Future}
|
||||
|
||||
/**
|
||||
* MySqlBatchChangeRepository implements the JDBC queries that support the APIs defined in BatchChangeRepository.scala
|
||||
* BatchChange and SingleChange are stored in RDS as two tables.
|
||||
@ -185,10 +181,9 @@ class MySqlBatchChangeRepository
|
||||
.apply()
|
||||
batchMeta.copy(changes = changes)
|
||||
}
|
||||
|
||||
def updateSingleChangeStatus(singleChanges: Seq[SingleChange]): Future[Option[BatchChange]] = {
|
||||
logger.info(s"Updating single change status: ${singleChanges.map(ch => (ch.id, ch.status))}")
|
||||
Future {
|
||||
monitor("repo.BatchChangeJDBC.updateSingleChanges") {
|
||||
IO {
|
||||
logger.info(s"Updating single change status: ${singleChanges.map(ch => (ch.id, ch.status))}")
|
||||
DB.localTx { implicit s =>
|
||||
for {
|
||||
headChange <- singleChanges.headOption
|
||||
@ -196,12 +191,10 @@ class MySqlBatchChangeRepository
|
||||
_ = UPDATE_SINGLE_CHANGE.batchByName(batchParams: _*).apply()
|
||||
batchChange <- getBatchFromSingleChangeId(headChange.id)
|
||||
} yield batchChange
|
||||
}}}
|
||||
|
||||
monitor("repo.BatchChangeJDBC.updateSingleChanges") {
|
||||
IO {Await.result(updateSingleChangeStatus(singleChanges), 50.seconds)}
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
def getSingleChanges(singleChangeIds: List[String]): IO[List[SingleChange]] =
|
||||
if (singleChangeIds.isEmpty) {
|
||||
IO.pure(List())
|
||||
|
@ -301,6 +301,7 @@ akka.http {
|
||||
# The time period within which the TCP binding process must be completed.
|
||||
# Set to `infinite` to disable.
|
||||
bind-timeout = 5s
|
||||
request-timeout = 60s
|
||||
|
||||
# Show verbose error messages back to the client
|
||||
verbose-error-messages = on
|
||||
|
@ -359,7 +359,7 @@ akka.http {
|
||||
# The time period within which the TCP binding process must be completed.
|
||||
# Set to `infinite` to disable.
|
||||
bind-timeout = 5s
|
||||
|
||||
request-timeout = 60s
|
||||
# Show verbose error messages back to the client
|
||||
verbose-error-messages = on
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user