@upstash/qstash 0.3.5 → 0.3.6
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.
package/esm/pkg/client/client.js
CHANGED
package/esm/pkg/client/http.js
CHANGED
|
@@ -35,8 +35,8 @@ export class HttpClient {
|
|
|
35
35
|
}
|
|
36
36
|
else {
|
|
37
37
|
this.retry = {
|
|
38
|
-
attempts: config
|
|
39
|
-
backoff: config
|
|
38
|
+
attempts: config.retry?.retries ? config.retry.retries + 1 : 5,
|
|
39
|
+
backoff: config.retry?.backoff ??
|
|
40
40
|
((retryCount) => Math.exp(retryCount) * 50),
|
|
41
41
|
};
|
|
42
42
|
}
|
package/package.json
CHANGED
|
@@ -38,8 +38,8 @@ class HttpClient {
|
|
|
38
38
|
}
|
|
39
39
|
else {
|
|
40
40
|
this.retry = {
|
|
41
|
-
attempts: config
|
|
42
|
-
backoff: config
|
|
41
|
+
attempts: config.retry?.retries ? config.retry.retries + 1 : 5,
|
|
42
|
+
backoff: config.retry?.backoff ??
|
|
43
43
|
((retryCount) => Math.exp(retryCount) * 50),
|
|
44
44
|
};
|
|
45
45
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Requester } from "./http.js";
|
|
1
|
+
import { Requester, RetryConfig } from "./http.js";
|
|
2
2
|
import { Topics } from "./topics.js";
|
|
3
3
|
import { Messages } from "./messages.js";
|
|
4
4
|
import { Schedules } from "./schedules.js";
|
|
@@ -18,6 +18,10 @@ export declare type ClientConfig = {
|
|
|
18
18
|
* The authorization token from the upstash console.
|
|
19
19
|
*/
|
|
20
20
|
token: string;
|
|
21
|
+
/**
|
|
22
|
+
* Configure how the client should retry requests.
|
|
23
|
+
*/
|
|
24
|
+
retry?: RetryConfig | false;
|
|
21
25
|
};
|
|
22
26
|
declare type Destination = {
|
|
23
27
|
/**
|