Using `destroy_async` with Mongoid 8?

from blog updown.io, | ↗ original
I wanted to improve the responsiveness of the Delete account action, which could be slow for bigger/older accounts due to the many associated records to be destroyed (downtimes, metrics) being sparsely distributed in the database. This sounded like a wonderfully perfect use-case for the recent dependent: :destroy_async option added in Rails 6.1....