Skip to content

Commit 24138e5

Browse files
committed
fix: fmt
1 parent 467f7c3 commit 24138e5

File tree

5 files changed

+49
-51
lines changed

5 files changed

+49
-51
lines changed

qstash/asyncio/message.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ async def publish(
7979
8080
By default, the `retryDelay` is exponential backoff.
8181
More details can be found in: https://upstash.com/docs/qstash/features/retry.
82-
82+
8383
The `retryDelay` option allows you to customize the delay (in milliseconds) between retry attempts when message delivery fails.
84-
84+
8585
You can use mathematical expressions and the following built-in functions to calculate the delay dynamically.
8686
The special variable `retried` represents the current retry attempt count (starting from 0).
87-
87+
8888
Supported functions:
8989
- `pow`
9090
- `sqrt`
@@ -95,7 +95,7 @@ async def publish(
9595
- `round`
9696
- `min`
9797
- `max`
98-
98+
9999
Examples of valid `retryDelay` values:
100100
```py
101101
1000 # 1 second
@@ -207,12 +207,12 @@ async def publish_json(
207207
208208
By default, the `retryDelay` is exponential backoff.
209209
More details can be found in: https://upstash.com/docs/qstash/features/retry.
210-
210+
211211
The `retryDelay` option allows you to customize the delay (in milliseconds) between retry attempts when message delivery fails.
212-
212+
213213
You can use mathematical expressions and the following built-in functions to calculate the delay dynamically.
214214
The special variable `retried` represents the current retry attempt count (starting from 0).
215-
215+
216216
Supported functions:
217217
- `pow`
218218
- `sqrt`
@@ -223,7 +223,7 @@ async def publish_json(
223223
- `round`
224224
- `min`
225225
- `max`
226-
226+
227227
Examples of valid `retryDelay` values:
228228
```py
229229
1000 # 1 second
@@ -322,12 +322,12 @@ async def enqueue(
322322
323323
By default, the `retryDelay` is exponential backoff.
324324
More details can be found in: https://upstash.com/docs/qstash/features/retry.
325-
325+
326326
The `retryDelay` option allows you to customize the delay (in milliseconds) between retry attempts when message delivery fails.
327-
327+
328328
You can use mathematical expressions and the following built-in functions to calculate the delay dynamically.
329329
The special variable `retried` represents the current retry attempt count (starting from 0).
330-
330+
331331
Supported functions:
332332
- `pow`
333333
- `sqrt`
@@ -338,7 +338,7 @@ async def enqueue(
338338
- `round`
339339
- `min`
340340
- `max`
341-
341+
342342
Examples of valid `retryDelay` values:
343343
```py
344344
1000 # 1 second
@@ -441,12 +441,12 @@ async def enqueue_json(
441441
442442
By default, the `retryDelay` is exponential backoff.
443443
More details can be found in: https://upstash.com/docs/qstash/features/retry.
444-
444+
445445
The `retryDelay` option allows you to customize the delay (in milliseconds) between retry attempts when message delivery fails.
446-
446+
447447
You can use mathematical expressions and the following built-in functions to calculate the delay dynamically.
448448
The special variable `retried` represents the current retry attempt count (starting from 0).
449-
449+
450450
Supported functions:
451451
- `pow`
452452
- `sqrt`
@@ -457,7 +457,7 @@ async def enqueue_json(
457457
- `round`
458458
- `min`
459459
- `max`
460-
460+
461461
Examples of valid `retryDelay` values:
462462
```py
463463
1000 # 1 second

qstash/asyncio/schedule.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ async def create(
5656
5757
By default, the `retryDelay` is exponential backoff.
5858
More details can be found in: https://upstash.com/docs/qstash/features/retry.
59-
59+
6060
The `retryDelay` option allows you to customize the delay (in milliseconds) between retry attempts when message delivery fails.
61-
61+
6262
You can use mathematical expressions and the following built-in functions to calculate the delay dynamically.
6363
The special variable `retried` represents the current retry attempt count (starting from 0).
64-
64+
6565
Supported functions:
6666
- `pow`
6767
- `sqrt`
@@ -72,7 +72,7 @@ async def create(
7272
- `round`
7373
- `min`
7474
- `max`
75-
75+
7676
Examples of valid `retryDelay` values:
7777
```py
7878
1000 # 1 second
@@ -166,12 +166,12 @@ async def create_json(
166166
167167
By default, the `retryDelay` is exponential backoff.
168168
More details can be found in: https://upstash.com/docs/qstash/features/retry.
169-
169+
170170
The `retryDelay` option allows you to customize the delay (in milliseconds) between retry attempts when message delivery fails.
171-
171+
172172
You can use mathematical expressions and the following built-in functions to calculate the delay dynamically.
173173
The special variable `retried` represents the current retry attempt count (starting from 0).
174-
174+
175175
Supported functions:
176176
- `pow`
177177
- `sqrt`
@@ -182,7 +182,7 @@ async def create_json(
182182
- `round`
183183
- `min`
184184
- `max`
185-
185+
186186
Examples of valid `retryDelay` values:
187187
```py
188188
1000 # 1 second

qstash/message.py

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,7 @@ def prepare_batch_message_body(messages: List[BatchRequest]) -> str:
636636
callback_headers=msg.get("callback_headers"),
637637
failure_callback_headers=msg.get("failure_callback_headers"),
638638
retries=msg.get("retries"),
639+
retry_delay=msg.get("retry_delay"),
639640
callback=msg.get("callback"),
640641
failure_callback=msg.get("failure_callback"),
641642
delay=msg.get("delay"),
@@ -846,12 +847,12 @@ def publish(
846847
847848
By default, the `retryDelay` is exponential backoff.
848849
More details can be found in: https://upstash.com/docs/qstash/features/retry.
849-
850+
850851
The `retryDelay` option allows you to customize the delay (in milliseconds) between retry attempts when message delivery fails.
851-
852+
852853
You can use mathematical expressions and the following built-in functions to calculate the delay dynamically.
853854
The special variable `retried` represents the current retry attempt count (starting from 0).
854-
855+
855856
Supported functions:
856857
- `pow`
857858
- `sqrt`
@@ -862,7 +863,7 @@ def publish(
862863
- `round`
863864
- `min`
864865
- `max`
865-
866+
866867
Examples of valid `retryDelay` values:
867868
```py
868869
1000 # 1 second
@@ -974,12 +975,12 @@ def publish_json(
974975
975976
By default, the `retryDelay` is exponential backoff.
976977
More details can be found in: https://upstash.com/docs/qstash/features/retry.
977-
978+
978979
The `retryDelay` option allows you to customize the delay (in milliseconds) between retry attempts when message delivery fails.
979-
980+
980981
You can use mathematical expressions and the following built-in functions to calculate the delay dynamically.
981982
The special variable `retried` represents the current retry attempt count (starting from 0).
982-
983+
983984
Supported functions:
984985
- `pow`
985986
- `sqrt`
@@ -990,7 +991,7 @@ def publish_json(
990991
- `round`
991992
- `min`
992993
- `max`
993-
994+
994995
Examples of valid `retryDelay` values:
995996
```py
996997
1000 # 1 second
@@ -1089,12 +1090,12 @@ def enqueue(
10891090
10901091
By default, the `retryDelay` is exponential backoff.
10911092
More details can be found in: https://upstash.com/docs/qstash/features/retry.
1092-
1093+
10931094
The `retryDelay` option allows you to customize the delay (in milliseconds) between retry attempts when message delivery fails.
1094-
1095+
10951096
You can use mathematical expressions and the following built-in functions to calculate the delay dynamically.
10961097
The special variable `retried` represents the current retry attempt count (starting from 0).
1097-
1098+
10981099
Supported functions:
10991100
- `pow`
11001101
- `sqrt`
@@ -1105,7 +1106,7 @@ def enqueue(
11051106
- `round`
11061107
- `min`
11071108
- `max`
1108-
1109+
11091110
Examples of valid `retryDelay` values:
11101111
```py
11111112
1000 # 1 second
@@ -1208,12 +1209,12 @@ def enqueue_json(
12081209
12091210
By default, the `retryDelay` is exponential backoff.
12101211
More details can be found in: https://upstash.com/docs/qstash/features/retry.
1211-
1212+
12121213
The `retryDelay` option allows you to customize the delay (in milliseconds) between retry attempts when message delivery fails.
1213-
1214+
12141215
You can use mathematical expressions and the following built-in functions to calculate the delay dynamically.
12151216
The special variable `retried` represents the current retry attempt count (starting from 0).
1216-
1217+
12171218
Supported functions:
12181219
- `pow`
12191220
- `sqrt`
@@ -1224,7 +1225,7 @@ def enqueue_json(
12241225
- `round`
12251226
- `min`
12261227
- `max`
1227-
1228+
12281229
Examples of valid `retryDelay` values:
12291230
```py
12301231
1000 # 1 second

qstash/schedule.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ def prepare_schedule_headers(
146146

147147
h[k] = str(v)
148148

149-
150149
if retries is not None:
151150
h["Upstash-Retries"] = str(retries)
152151

@@ -282,12 +281,12 @@ def create(
282281
283282
By default, the `retryDelay` is exponential backoff.
284283
More details can be found in: https://upstash.com/docs/qstash/features/retry.
285-
284+
286285
The `retryDelay` option allows you to customize the delay (in milliseconds) between retry attempts when message delivery fails.
287-
286+
288287
You can use mathematical expressions and the following built-in functions to calculate the delay dynamically.
289288
The special variable `retried` represents the current retry attempt count (starting from 0).
290-
289+
291290
Supported functions:
292291
- `pow`
293292
- `sqrt`
@@ -298,7 +297,7 @@ def create(
298297
- `round`
299298
- `min`
300299
- `max`
301-
300+
302301
Examples of valid `retryDelay` values:
303302
```py
304303
1000 # 1 second
@@ -392,12 +391,12 @@ def create_json(
392391
393392
By default, the `retryDelay` is exponential backoff.
394393
More details can be found in: https://upstash.com/docs/qstash/features/retry.
395-
394+
396395
The `retryDelay` option allows you to customize the delay (in milliseconds) between retry attempts when message delivery fails.
397-
396+
398397
You can use mathematical expressions and the following built-in functions to calculate the delay dynamically.
399398
The special variable `retried` represents the current retry attempt count (starting from 0).
400-
399+
401400
Supported functions:
402401
- `pow`
403402
- `sqrt`
@@ -408,7 +407,7 @@ def create_json(
408407
- `round`
409408
- `min`
410409
- `max`
411-
410+
412411
Examples of valid `retryDelay` values:
413412
```py
414413
1000 # 1 second

tests/test_schedules.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ def test_schedule_lifecycle(
2929
client: QStash,
3030
cleanup_schedule: Callable[[QStash, str], None],
3131
) -> None:
32-
3332
schedule_id = client.schedule.create_json(
3433
cron="1 1 1 1 1",
3534
destination="https://httpstat.us/200",
@@ -41,7 +40,6 @@ def test_schedule_lifecycle(
4140

4241
assert len(schedule_id) > 0
4342

44-
4543
res = client.schedule.get(schedule_id)
4644
assert res.schedule_id == schedule_id
4745
assert res.cron == "1 1 1 1 1"

0 commit comments

Comments
 (0)