File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
lambda-runtime/src/commonMain/kotlin/io/github/trueangle/knative/lambda/runtime Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ object LambdaRuntime {
6363
6464 with (Log ) {
6565 setContext(context)
66+
6667 trace(event)
6768 trace(context)
6869 }
@@ -83,6 +84,7 @@ object LambdaRuntime {
8384 when (e) {
8485 is NonRecoverableStateException -> {
8586 Log .fatal(e)
87+
8688 exitProcess(1 )
8789 }
8890
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ import io.ktor.http.contentType
2424import io.ktor.util.reflect.TypeInfo
2525import kotlinx.serialization.json.Json
2626import kotlin.time.Duration.Companion.minutes
27- import kotlin.time.TimeSource
2827import io.ktor.http.ContentType.Application.Json as ContentTypeJson
2928
3029@PublishedApi
@@ -34,9 +33,8 @@ internal class LambdaClient(private val httpClient: HttpClient) {
3433 suspend fun <T > retrieveNextEvent (bodyType : TypeInfo ): Pair <T , Context > {
3534 val response = httpClient.get {
3635 url(" ${invokeUrl} /invocation/next" )
37- timeout {
38- requestTimeoutMillis = 60 * 1000 * 30 // todo
39- }
36+
37+ timeout { requestTimeoutMillis = 15 .minutes.inWholeMilliseconds }
4038 }
4139 val context = contextFromResponseHeaders(response)
4240 val body = try {
@@ -72,7 +70,7 @@ internal class LambdaClient(private val httpClient: HttpClient) {
7270 url(" ${invokeUrl} /invocation/${event.awsRequestId} /response" )
7371
7472 timeout {
75- requestTimeoutMillis = 30 .minutes.inWholeMilliseconds // todo
73+ requestTimeoutMillis = 15 .minutes.inWholeMilliseconds
7674 }
7775
7876 headers {
You can’t perform that action at this time.
0 commit comments