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