@@ -112,15 +112,15 @@ object IngestionClient {
112
112
)
113
113
114
114
private def readTimeout (): Duration = {
115
- Duration (25 , TimeUnit .SECONDS )
115
+ Duration (25000 , TimeUnit .MILLISECONDS )
116
116
}
117
117
118
118
private def connectTimeout (): Duration = {
119
- Duration (25 , TimeUnit .SECONDS )
119
+ Duration (25000 , TimeUnit .MILLISECONDS )
120
120
}
121
121
122
122
private def writeTimeout (): Duration = {
123
- Duration (25 , TimeUnit .SECONDS )
123
+ Duration (25000 , TimeUnit .MILLISECONDS )
124
124
}
125
125
126
126
private def hosts (region : String ): Seq [Host ] = {
@@ -1223,7 +1223,16 @@ class IngestionClient(
1223
1223
.withBody(pushTaskPayload)
1224
1224
.withQueryParameter(" watch" , watch)
1225
1225
.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
+ )
1227
1236
}
1228
1237
1229
1238
/** 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(
1453
1462
.withMethod(" POST" )
1454
1463
.withPath(s " /1/sources/ ${escape(sourceID)}/discover " )
1455
1464
.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
+ )
1457
1475
}
1458
1476
1459
1477
/** Try a transformation before creating it.
@@ -1676,7 +1694,16 @@ class IngestionClient(
1676
1694
.withPath(s " /1/sources/validate " )
1677
1695
.withBody(sourceCreate)
1678
1696
.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
+ )
1680
1707
}
1681
1708
1682
1709
/** 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(
1704
1731
.withPath(s " /1/sources/ ${escape(sourceID)}/validate " )
1705
1732
.withBody(sourceUpdate)
1706
1733
.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
+ )
1708
1744
}
1709
1745
1710
1746
}
0 commit comments