fast_curl 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +20 -0
- data/ext/fast_curl/fast_curl.c +829 -485
- data/lib/fast_curl/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 279ce69cb40c48246c4e6276260a928f4e03ae86e691f876492ba25a39eb00c7
|
|
4
|
+
data.tar.gz: 577583ed2fde2e2653f1e27f22caca08846fd32bb49524a59f44e5b3ba3acee9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3e0edb04a304a46adaab5368289d2332672fcd7654506c6449cde10ea5b5620cc4ba71549f60fccb0308d2ef67c8dc4e4e54304efa8c84dfc1631f360f89cdc8
|
|
7
|
+
data.tar.gz: 54693fc0a4189cf60e48f35b92d4f82ba1971b170cf54b610ed27378b5c296c50fa88798b4d0ac135ca3734b1cce7abf0b5214ed60e18aa90f0f158d8f708199
|
data/README.md
CHANGED
|
@@ -76,6 +76,23 @@ FastCurl.stream_get(urls, connections: 50) do |index, response|
|
|
|
76
76
|
end
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
+
### Retry functionality (v0.2.0+)
|
|
80
|
+
|
|
81
|
+
```ruby
|
|
82
|
+
# Automatic retry on network errors (timeout, connection issues)
|
|
83
|
+
results = FastCurl.get([
|
|
84
|
+
{ url: "https://unreliable-api.com/data" }
|
|
85
|
+
], retries: 3, retry_delay: 1000) # 3 retries with 1s delay
|
|
86
|
+
|
|
87
|
+
# Retry on specific HTTP status codes
|
|
88
|
+
results = FastCurl.get([
|
|
89
|
+
{ url: "https://api.example.com/data" }
|
|
90
|
+
], retries: 2, retry_codes: [500, 502, 503], retry_delay: 500)
|
|
91
|
+
|
|
92
|
+
# Disable retries (default is 1 retry)
|
|
93
|
+
results = FastCurl.get(urls, retries: 0)
|
|
94
|
+
```
|
|
95
|
+
|
|
79
96
|
### Inside Async
|
|
80
97
|
|
|
81
98
|
```ruby
|
|
@@ -119,6 +136,9 @@ end
|
|
|
119
136
|
|---|---|---|
|
|
120
137
|
| `connections` | 20 | Max parallel connections |
|
|
121
138
|
| `timeout` | 30 | Per-request timeout in seconds |
|
|
139
|
+
| `retries` | 1 | Number of retry attempts (0-10) |
|
|
140
|
+
| `retry_delay` | 0 | Delay between retries in milliseconds |
|
|
141
|
+
| `retry_codes` | [] | HTTP status codes to retry on |
|
|
122
142
|
|
|
123
143
|
## Performance
|
|
124
144
|
|