@@ -77,10 +77,7 @@ async def wrapper(*args: Params.args, **kwargs: Params.kwargs) -> ReturnValue:
77
77
class StripeTaskError (PolarTaskError ): ...
78
78
79
79
80
- @actor (
81
- actor_name = "stripe.webhook.account.updated" ,
82
- priority = TaskPriority .HIGH ,
83
- )
80
+ @actor (actor_name = "stripe.webhook.account.updated" , priority = TaskPriority .HIGH )
84
81
@stripe_api_connection_error_retry
85
82
async def account_updated (event_id : uuid .UUID ) -> None :
86
83
async with AsyncSessionMaker () as session :
@@ -91,10 +88,7 @@ async def account_updated(event_id: uuid.UUID) -> None:
91
88
)
92
89
93
90
94
- @actor (
95
- actor_name = "stripe.webhook.payment_intent.succeeded" ,
96
- priority = TaskPriority .HIGH ,
97
- )
91
+ @actor (actor_name = "stripe.webhook.payment_intent.succeeded" , priority = TaskPriority .HIGH )
98
92
@stripe_api_connection_error_retry
99
93
async def payment_intent_succeeded (event_id : uuid .UUID ) -> None :
100
94
async with AsyncSessionMaker () as session :
@@ -160,10 +154,7 @@ async def payment_intent_payment_failed(event_id: uuid.UUID) -> None:
160
154
raise
161
155
162
156
163
- @actor (
164
- actor_name = "stripe.webhook.setup_intent.succeeded" ,
165
- priority = TaskPriority .HIGH ,
166
- )
157
+ @actor (actor_name = "stripe.webhook.setup_intent.succeeded" , priority = TaskPriority .HIGH )
167
158
@stripe_api_connection_error_retry
168
159
async def setup_intent_succeeded (event_id : uuid .UUID ) -> None :
169
160
async with AsyncSessionMaker () as session :
@@ -182,8 +173,7 @@ async def setup_intent_succeeded(event_id: uuid.UUID) -> None:
182
173
183
174
184
175
@actor (
185
- actor_name = "stripe.webhook.setup_intent.setup_failed" ,
186
- priority = TaskPriority .HIGH ,
176
+ actor_name = "stripe.webhook.setup_intent.setup_failed" , priority = TaskPriority .HIGH
187
177
)
188
178
@stripe_api_connection_error_retry
189
179
async def setup_intent_setup_failed (event_id : uuid .UUID ) -> None :
@@ -201,10 +191,7 @@ async def setup_intent_setup_failed(event_id: uuid.UUID) -> None:
201
191
raise
202
192
203
193
204
- @actor (
205
- actor_name = "stripe.webhook.charge.pending" ,
206
- priority = TaskPriority .HIGH ,
207
- )
194
+ @actor (actor_name = "stripe.webhook.charge.pending" , priority = TaskPriority .HIGH )
208
195
async def charge_pending (event_id : uuid .UUID ) -> None :
209
196
async with AsyncSessionMaker () as session :
210
197
async with external_event_service .handle_stripe (session , event_id ) as event :
@@ -224,10 +211,7 @@ async def charge_pending(event_id: uuid.UUID) -> None:
224
211
)
225
212
226
213
227
- @actor (
228
- actor_name = "stripe.webhook.charge.failed" ,
229
- priority = TaskPriority .HIGH ,
230
- )
214
+ @actor (actor_name = "stripe.webhook.charge.failed" , priority = TaskPriority .HIGH )
231
215
async def charge_failed (event_id : uuid .UUID ) -> None :
232
216
async with AsyncSessionMaker () as session :
233
217
async with external_event_service .handle_stripe (session , event_id ) as event :
@@ -243,10 +227,7 @@ async def charge_failed(event_id: uuid.UUID) -> None:
243
227
raise
244
228
245
229
246
- @actor (
247
- actor_name = "stripe.webhook.charge.succeeded" ,
248
- priority = TaskPriority .HIGH ,
249
- )
230
+ @actor (actor_name = "stripe.webhook.charge.succeeded" , priority = TaskPriority .HIGH )
250
231
@stripe_api_connection_error_retry
251
232
async def charge_succeeded (event_id : uuid .UUID ) -> None :
252
233
async with AsyncSessionMaker () as session :
@@ -264,10 +245,7 @@ async def charge_succeeded(event_id: uuid.UUID) -> None:
264
245
raise
265
246
266
247
267
- @actor (
268
- actor_name = "stripe.webhook.refund.created" ,
269
- priority = TaskPriority .HIGH ,
270
- )
248
+ @actor (actor_name = "stripe.webhook.refund.created" , priority = TaskPriority .HIGH )
271
249
@stripe_api_connection_error_retry
272
250
async def refund_created (event_id : uuid .UUID ) -> None :
273
251
async with AsyncSessionMaker () as session :
@@ -282,10 +260,7 @@ async def refund_created(event_id: uuid.UUID) -> None:
282
260
await refund_service .create_from_stripe (session , stripe_refund = refund )
283
261
284
262
285
- @actor (
286
- actor_name = "stripe.webhook.refund.updated" ,
287
- priority = TaskPriority .HIGH ,
288
- )
263
+ @actor (actor_name = "stripe.webhook.refund.updated" , priority = TaskPriority .HIGH )
289
264
@stripe_api_connection_error_retry
290
265
async def refund_updated (event_id : uuid .UUID ) -> None :
291
266
async with AsyncSessionMaker () as session :
@@ -300,10 +275,7 @@ async def refund_updated(event_id: uuid.UUID) -> None:
300
275
await refund_service .upsert_from_stripe (session , stripe_refund = refund )
301
276
302
277
303
- @actor (
304
- actor_name = "stripe.webhook.refund.failed" ,
305
- priority = TaskPriority .HIGH ,
306
- )
278
+ @actor (actor_name = "stripe.webhook.refund.failed" , priority = TaskPriority .HIGH )
307
279
@stripe_api_connection_error_retry
308
280
async def refund_failed (event_id : uuid .UUID ) -> None :
309
281
async with AsyncSessionMaker () as session :
@@ -318,10 +290,7 @@ async def refund_failed(event_id: uuid.UUID) -> None:
318
290
await refund_service .upsert_from_stripe (session , stripe_refund = refund )
319
291
320
292
321
- @actor (
322
- actor_name = "stripe.webhook.charge.dispute.closed" ,
323
- priority = TaskPriority .HIGH ,
324
- )
293
+ @actor (actor_name = "stripe.webhook.charge.dispute.closed" , priority = TaskPriority .HIGH )
325
294
@stripe_api_connection_error_retry
326
295
async def charge_dispute_closed (event_id : uuid .UUID ) -> None :
327
296
async with AsyncSessionMaker () as session :
@@ -389,10 +358,7 @@ async def customer_subscription_deleted(event_id: uuid.UUID) -> None:
389
358
raise
390
359
391
360
392
- @actor (
393
- actor_name = "stripe.webhook.invoice.created" ,
394
- priority = TaskPriority .HIGH ,
395
- )
361
+ @actor (actor_name = "stripe.webhook.invoice.created" , priority = TaskPriority .HIGH )
396
362
@stripe_api_connection_error_retry
397
363
async def invoice_created (event_id : uuid .UUID ) -> None :
398
364
async with AsyncSessionMaker () as session :
@@ -414,10 +380,7 @@ async def invoice_created(event_id: uuid.UUID) -> None:
414
380
return
415
381
416
382
417
- @actor (
418
- actor_name = "stripe.webhook.invoice.paid" ,
419
- priority = TaskPriority .HIGH ,
420
- )
383
+ @actor (actor_name = "stripe.webhook.invoice.paid" , priority = TaskPriority .HIGH )
421
384
@stripe_api_connection_error_retry
422
385
async def invoice_paid (event_id : uuid .UUID ) -> None :
423
386
async with AsyncSessionMaker () as session :
0 commit comments