@@ -112,15 +112,15 @@ object IngestionClient {
112112 )
113113
114114 private def readTimeout (): Duration = {
115- Duration (25 , TimeUnit .SECONDS )
115+ Duration (25000 , TimeUnit .MILLISECONDS )
116116 }
117117
118118 private def connectTimeout (): Duration = {
119- Duration (25 , TimeUnit .SECONDS )
119+ Duration (25000 , TimeUnit .MILLISECONDS )
120120 }
121121
122122 private def writeTimeout (): Duration = {
123- Duration (25 , TimeUnit .SECONDS )
123+ Duration (25000 , TimeUnit .MILLISECONDS )
124124 }
125125
126126 private def hosts (region : String ): Seq [Host ] = {
@@ -1223,7 +1223,16 @@ class IngestionClient(
12231223 .withBody(pushTaskPayload)
12241224 .withQueryParameter(" watch" , watch)
12251225 .build()
1226- execute[WatchResponse ](request, requestOptions)
1226+ execute[WatchResponse ](
1227+ request,
1228+ Some (
1229+ RequestOptions (
1230+ writeTimeout = Some (Duration (180000 , TimeUnit .MILLISECONDS )),
1231+ readTimeout = Some (Duration (180000 , TimeUnit .MILLISECONDS )),
1232+ connectTimeout = Some (Duration (180000 , TimeUnit .MILLISECONDS ))
1233+ ) + requestOptions
1234+ )
1235+ )
12271236 }
12281237
12291238 /** Runs all tasks linked to a source, only available for Shopify sources. It will create 1 run per task.
@@ -1453,7 +1462,16 @@ class IngestionClient(
14531462 .withMethod(" POST" )
14541463 .withPath(s " /1/sources/ ${escape(sourceID)}/discover " )
14551464 .build()
1456- execute[WatchResponse ](request, requestOptions)
1465+ execute[WatchResponse ](
1466+ request,
1467+ Some (
1468+ RequestOptions (
1469+ writeTimeout = Some (Duration (180000 , TimeUnit .MILLISECONDS )),
1470+ readTimeout = Some (Duration (180000 , TimeUnit .MILLISECONDS )),
1471+ connectTimeout = Some (Duration (180000 , TimeUnit .MILLISECONDS ))
1472+ ) + requestOptions
1473+ )
1474+ )
14571475 }
14581476
14591477 /** Try a transformation before creating it.
@@ -1676,7 +1694,16 @@ class IngestionClient(
16761694 .withPath(s " /1/sources/validate " )
16771695 .withBody(sourceCreate)
16781696 .build()
1679- execute[WatchResponse ](request, requestOptions)
1697+ execute[WatchResponse ](
1698+ request,
1699+ Some (
1700+ RequestOptions (
1701+ writeTimeout = Some (Duration (180000 , TimeUnit .MILLISECONDS )),
1702+ readTimeout = Some (Duration (180000 , TimeUnit .MILLISECONDS )),
1703+ connectTimeout = Some (Duration (180000 , TimeUnit .MILLISECONDS ))
1704+ ) + requestOptions
1705+ )
1706+ )
16801707 }
16811708
16821709 /** Validates an update of a source payload to ensure it can be created and that the data source can be reached by
@@ -1704,7 +1731,16 @@ class IngestionClient(
17041731 .withPath(s " /1/sources/ ${escape(sourceID)}/validate " )
17051732 .withBody(sourceUpdate)
17061733 .build()
1707- execute[WatchResponse ](request, requestOptions)
1734+ execute[WatchResponse ](
1735+ request,
1736+ Some (
1737+ RequestOptions (
1738+ writeTimeout = Some (Duration (180000 , TimeUnit .MILLISECONDS )),
1739+ readTimeout = Some (Duration (180000 , TimeUnit .MILLISECONDS )),
1740+ connectTimeout = Some (Duration (180000 , TimeUnit .MILLISECONDS ))
1741+ ) + requestOptions
1742+ )
1743+ )
17081744 }
17091745
17101746}
0 commit comments