File tree 1 file changed +16
-7
lines changed
1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -332,10 +332,11 @@ clsas SomeInteractorJob
332
332
SomeInteractor .call(* args)
333
333
end
334
334
end
335
+ ```
335
336
336
- SomeInteractor .call( * args)
337
- code is changed to
338
- SomeInteractorJob .perform_async(* args)
337
+ ``` diff
338
+ - SomeInteractor.call(*args)
339
+ + SomeInteractorJob.perform_async(*args)
339
340
```
340
341
341
342
``` ruby
@@ -347,14 +348,22 @@ class SomeInteractor
347
348
# ...
348
349
end
349
350
end
351
+ ```
350
352
351
- # no need to manually create a job class or handle the perform/call impedance mismatch
352
- SomeInteractor ::Async .call(* args)
353
+ No need to manually create a job class or handle the perform/call impedance mismatch
353
354
354
- # This also makes it easy to add cron jobs to run interactors. As any interactor can be asyncified.
355
- # By using it's internal Async class.
355
+ ``` diff
356
+ - SomeInteractor.call!(*args)
357
+ + SomeInteractor::Async.call!(*args)
356
358
```
357
359
360
+ This also makes it easy to add cron jobs to run interactors. As any interactor can be asyncified.
361
+ By using it's internal Async class.
362
+
363
+ N.B. as your class is now executing asynchronously you can no longer rely on its promises later on in the chain.
364
+
365
+
366
+
358
367
## FAQs
359
368
- This is ugly isn't it?
360
369
You can’t perform that action at this time.
0 commit comments