Process bulk suggestions action async (PR #2148)

https://community.ankihub.net/t/bulk-suggestion-performance-issue/234916

GitHub

Codecov Report

Attention: Patch coverage is 88.88889% with 2 lines in your changes missing coverage. Please review.

Project coverage is 43.36%. Comparing base (5082026) to head (947c5ad).

Additional details and impacted files
@@             Coverage Diff             @@
##              dev    #2148       +/-   ##
===========================================
- Coverage   97.82%   43.36%   -54.46%     
===========================================
  Files         156      155        -1     
  Lines       21841    21841               
===========================================
- Hits        21365     9472    -11893     
- Misses        476    12369    +11893     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

For now, it’s ok, but maybe we should think more about the UI/UX changes before merging this PR, move the calls of the use cases to a celery task will change the way that the users interact with this feature.

Not all use cases will have this execute method, maybe we should rewrite this function to be less generic

Not sure why this check was here. It seems unnecessary, so I removed it.

I’m not able to reproduce the pyupgrade errors locally :thinking:

:seedling: Would be great to define an ABC that all use cases inherit from.

The title of this pull request changed from “Exec use case async.” to "Process bulk suggestions action async