Skip to content

Commit a56a89b

Browse files
committed
Remove timeout in invocation GET
1 parent 458ebbd commit a56a89b

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

package.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: aws-lambda-haskell-runtime
2-
version: 1.0.9
2+
version: 1.0.10
33
github: "theam/aws-lambda-haskell-runtime"
44
license: Apache-2.0
55
author: Nikita Tchayka
@@ -26,6 +26,7 @@ library:
2626
- conduit
2727
- directory
2828
- filepath
29+
- http-client
2930
- microlens-platform
3031
- optparse-generic
3132
- process

src/Aws/Lambda/Runtime.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import Data.Monoid ((<>))
2020
import qualified Data.CaseInsensitive as CI
2121
import Lens.Micro.Platform hiding ((.=))
2222
import qualified Network.Wreq as Wreq
23+
import qualified Network.HTTP.Client as Http
2324
import qualified System.Environment as Environment
2425
import qualified System.Process as Process
2526
import qualified Data.UUID as UUID
@@ -132,8 +133,10 @@ readFunctionMemory = do
132133

133134
getApiData :: Text -> App (Wreq.Response LByteString)
134135
getApiData endpoint =
135-
keepRetrying (Wreq.get $ nextInvocationEndpoint endpoint)
136+
keepRetrying (Wreq.getWith opts $ nextInvocationEndpoint endpoint)
136137
where
138+
opts = Wreq.defaults
139+
& Wreq.manager .~ Left (Http.defaultManagerSettings { Http.managerResponseTimeout = Http.responseTimeoutNone })
137140
keepRetrying :: IO (Wreq.Response LByteString) -> App (Wreq.Response LByteString)
138141
keepRetrying f = do
139142
result <- (liftIO $ try f) :: App (Either IOException (Wreq.Response LByteString))

stack.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#
1818
# resolver: ./custom-snapshot.yaml
1919
# resolver: https://example.com/snapshots/2018-01-01.yaml
20-
resolver: lts-12.13
20+
resolver: lts-13.0
2121

2222
# User packages to be built.
2323
# Various formats can be used as shown in the example below.

0 commit comments

Comments
 (0)