Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
knowledge-platform
Commits
a823ad3c
Commit
a823ad3c
authored
3 years ago
by
Karthikeyan R
Browse files
Options
Download
Patches
Plain Diff
Using config parameter for request timeout
parent
19b80132
s-debug
AmiableAnil-patch-1
Gcloud_copy
Gcloud_fix
Remove_unwantedCode_Gcloud_fix
bulk-upload-comptenecy-mapping
bulk-upload-excelsheet
bulk-upload-test_excel
bulk_upload
csp-migration
dependabot/maven/platform-core/platform-telemetry/ch.qos.logback-logback-core-1.2.9
dependabot/maven/search-api/search-core/org.apache.httpcomponents-httpclient-4.5.13
knowlg-friday
knowlg-oneclick
local-setup-kube
master
patch-1
patch-2
patch-3
poc_bulk_upload
qs-schema
rahul_bulk_upload_postgres
release-4.10.0
release-4.10.1
release-4.9.0
release-4.9.1
release-5.0.0
release-5.0.1
release-5.1.0
release-5.1.0-content
release-5.2.0
release-5.3.0
release-5.2.0_RC2
release-5.2.0_RC1
release-5.1.0_RC1
release-5.0.0_RC2
release-5.0.0_RC1
release-4.10.0_RC2
release-4.10.0_RC1
release-4.9.1_RC1
release-4.9.0_RC8
release-4.9.0_RC7
release-4.9.0_RC6
release-4.9.0_RC5
release-4.9.0_RC4
release-4.9.0_RC3
release-4.9.0_RC2
release-4.9.0_RC1
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
content-api/content-service/app/controllers/BaseController.scala
+2
-1
...-api/content-service/app/controllers/BaseController.scala
content-api/content-service/conf/application.conf
+3
-0
content-api/content-service/conf/application.conf
with
5 additions
and
1 deletion
+5
-1
content-api/content-service/app/controllers/BaseController.scala
+
2
−
1
View file @
a823ad3c
...
...
@@ -26,6 +26,7 @@ abstract class BaseController(protected val cc: ControllerComponents)(implicit e
new
util
.
HashMap
[
String
,
AnyRef
]()).
asInstanceOf
[
java.util.Map
[
String
,
AnyRef
]]
val
mimeTypesToCheck
=
List
(
"application/vnd.ekstep.h5p-archive"
,
"application/vnd.ekstep.html-archive"
,
"application/vnd.android.package-archive"
,
"video/webm"
,
"video/x-youtube"
,
"video/mp4"
)
val
actorTimeout
:
Long
=
Platform
.
getLong
(
"actor.timeoutMillisec"
,
120000L
)
def
requestBody
()(
implicit
request
:
Request
[
AnyContent
])
=
{
val
body
=
request
.
body
.
asJson
.
getOrElse
(
"{}"
).
toString
...
...
@@ -83,7 +84,7 @@ abstract class BaseController(protected val cc: ControllerComponents)(implicit e
}
def
getResult
(
apiId
:
String
,
actor
:
ActorRef
,
request
:
org.sunbird.common.dto.Request
,
categoryMapping
:
Boolean
=
false
,
version
:
String
=
"3.0"
)
:
Future
[
Result
]
=
{
val
future
=
Patterns
.
ask
(
actor
,
request
,
30000
)
recoverWith
{
case
e
:
Exception
=>
Future
(
ResponseHandler
.
getErrorResponse
(
e
))}
val
future
=
Patterns
.
ask
(
actor
,
request
,
actorTimeout
)
recoverWith
{
case
e
:
Exception
=>
Future
(
ResponseHandler
.
getErrorResponse
(
e
))}
future
.
map
(
f
=>
{
val
result
:
Response
=
f
.
asInstanceOf
[
Response
]
result
.
setId
(
apiId
)
...
...
This diff is collapsed.
Click to expand it.
content-api/content-service/conf/application.conf
+
3
−
0
View file @
a823ad3c
...
...
@@ -736,3 +736,6 @@ collection {
}
}
}
#Request timeout
actor
.
timeoutMillisec
=
120000
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets