Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor #338

Merged
merged 3 commits into from
Jul 26, 2018
Merged

Minor #338

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import it.gov.daf.common.sso.common

package catalog_manager.yaml {
// ----- Start of unmanaged code area for package Catalog_managerYaml

// ----- End of unmanaged code area for package Catalog_managerYaml
class Catalog_managerYaml @Inject() (
// ----- Start of unmanaged code area for injections Catalog_managerYaml
Expand Down Expand Up @@ -629,7 +629,7 @@ package catalog_manager.yaml {
val inferJson = Json.parse(kyloSchema)

val feedCreation = ws.url(KYLOURL + "/api/v1/feedmgr/feeds")
.withRequestTimeout(240 seconds)
//.withRequestTimeout(240 seconds)
.withAuth(KYLOUSER, KYLOPWD, WSAuthScheme.BASIC)

// it is a try i know is not a good practice
Expand Down
3 changes: 3 additions & 0 deletions catalog_manager/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ libraryDependencies ++= Seq(
"io.prometheus" % "simpleclient_common" % "0.1.0"
)

PlayKeys.devSettings := Seq("play.server.http.requestTimeout" -> "240s",
"play.server.http.idleTimeout" -> "240s")

resolvers ++= Seq(
Resolver.mavenLocal,
//"zalando-bintray" at "https://dl.bintray.com/zalando/maven",
Expand Down
6 changes: 6 additions & 0 deletions catalog_manager/conf/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,15 @@ kafkaProxy {
url="http://kafka-http-proxy.default.svc.cluster.local:8085"
}


play.ws.timeout.connection = 2400000 // The maximum time to wait when connecting to the remote host (default is 120 seconds).
play.ws.timeout.idle = 2400000 //The maximum time the request can stay idle (connection is established but waiting for more data) (default is 120 seconds).
play.ws.timeout.request= 2400000
play.http.parser.maxDiskBuffer = 20MB
play.http.parser.maxMemoryBuffer = 2MB
akka.http.server.idle-timeout = 240s
akka.http.server.request-timeout = 240s
play.server.akka.requestTimeout = 240s
play.server.http.idleTimeout = 240s
play.server.http.requestTimeout = 240s
parsers.anyContent.maxLength = 20MB
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import it.gov.daf.securitymanager.service.utilities.Utils

package security_manager.yaml {
// ----- Start of unmanaged code area for package Security_managerYaml

// ----- End of unmanaged code area for package Security_managerYaml
class Security_managerYaml @Inject() (
// ----- Start of unmanaged code area for injections Security_managerYaml
Expand Down Expand Up @@ -288,10 +288,12 @@ package security_manager.yaml {

if (CredentialManager.isDafAdmin(currentRequest) || CredentialManager.isDafEditor(currentRequest)) {
val result = credentials.flatMap { crd =>
logger.info("username -->" + crd.username)
logger.info("username --> " + crd.username )
val sftpInternal = new SftpHandler(crd.username, crd.password, ConfigReader.sftpHostInternal)
logger.debug("creating path " + ConfigReader.sftpHostInternal)
val resultInternal = sftpInternal.mkdir(path_to_create)
logger.debug("path created into daf.teamdigitale.it")
logger.debug("creating path " + ConfigReader.sftphostExternal)
val sftpExternal = new SftpHandler(crd.username, crd.password, ConfigReader.sftphostExternal)
val resultExternal = sftpExternal.mkdir(path_to_create)
logger.debug("path created into edge2")
Expand Down